├── .editorconfig
├── .env.example
├── .gitignore
├── README.md
├── composer.json
├── package.json
├── public
├── .htaccess
├── favicon.ico
├── index.php
├── mu-plugins
│ └── mu-plugins.php
├── plugins
│ └── index.php
├── themes
│ ├── index.php
│ └── wordplate
│ │ ├── 404.php
│ │ ├── footer.php
│ │ ├── functions.php
│ │ ├── header.php
│ │ ├── index.php
│ │ ├── screenshot.png
│ │ └── style.css
└── wp-config.php
├── resources
├── css
│ └── index.css
├── js
│ └── index.js
└── static
│ └── .gitkeep
├── src
└── helpers.php
├── vite.config.js
└── wp-cli.yml
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | end_of_line = lf
6 | indent_size = 2
7 | indent_style = space
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.php]
12 | indent_size = 4
13 |
14 | [composer.json]
15 | indent_size = 4
16 |
17 | [*.md]
18 | trim_trailing_whitespace = false
19 |
--------------------------------------------------------------------------------
/.env.example:
--------------------------------------------------------------------------------
1 | WP_DEBUG=true
2 | WP_DEFAULT_THEME=wordplate
3 | WP_ENVIRONMENT_TYPE=local
4 |
5 | DB_HOST=127.0.0.1
6 | DB_NAME=wordplate
7 | DB_USER=root
8 | DB_PASSWORD=
9 | DB_TABLE_PREFIX=wp_
10 |
11 | MAIL_HOST=127.0.0.1
12 | MAIL_PORT=2525
13 | MAIL_USERNAME=null
14 | MAIL_PASSWORD=null
15 | MAIL_ENCRYPTION=null
16 | MAIL_FROM_ADDRESS="hello@example.com"
17 | MAIL_FROM_NAME="Example"
18 |
19 | # https://vinkla.github.io/salts/
20 | AUTH_KEY=
21 | SECURE_AUTH_KEY=
22 | LOGGED_IN_KEY=
23 | NONCE_KEY=
24 | AUTH_SALT=
25 | SECURE_AUTH_SALT=
26 | LOGGED_IN_SALT=
27 | NONCE_SALT=
28 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .env
2 | /node_modules
3 | /public/cache
4 | /public/debug.log
5 | /public/languages
6 | /public/mu-plugins/*
7 | !/public/mu-plugins/mu-plugins.php
8 | /public/plugins/*
9 | !/public/plugins/index.php
10 | /public/themes/*/assets
11 | /public/upgrade
12 | /public/uploads
13 | /public/wordpress
14 | /vendor
15 | auth.json
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # WordPlate
4 |
5 | WordPlate is a boilerplate for WordPress, built with Composer and designed with sensible defaults.
6 |
7 | [](https://github.com/vinkla/wordplate/actions)
8 | [](https://packagist.org/packages/vinkla/wordplate/stats)
9 | [](https://packagist.org/packages/vinkla/wordplate)
10 |
11 | - [Features](#features)
12 | - [Installation](#installation)
13 | - [Configuration](#configuration)
14 | - [Public Directory](#public-directory)
15 | - [Environment Configuration](#environment-configuration)
16 | - [Salt Keys](#salt-keys)
17 | - [Plugins](#plugins)
18 | - [WordPress Packagist](#wordpress-packagist)
19 | - [Must Use Plugins](#must-use-plugins)
20 | - [Included Plugins](#included-plugins)
21 | - [Vite.js](#vitejs)
22 | - [Mail](#mail)
23 | - [FAQ](#faq)
24 | - [Upgrade Guide](#upgrade-guide)
25 | - [Acknowledgements](#acknowledgements)
26 | - [License](#license)
27 |
28 | ## Features
29 |
30 | - **WordPress + Composer = ❤️**
31 |
32 | WordPress can be installed and updated with ease using Composer. To update WordPress, simply run the command `composer update`.
33 |
34 | - **Environment Files**
35 |
36 | Similar to Laravel, WordPlate stores environment variables, such as database credentials, in an `.env` file.
37 |
38 | - **WordPress Packagist**
39 |
40 | WordPress Packagist enables the management of WordPress plugins and themes through Composer.
41 |
42 | - **Must-use plugins**
43 |
44 | Don't worry about clients deactivating plugins; [must-use plugins](https://developer.wordpress.org/advanced-administration/plugins/mu-plugins/) are enabled by default.
45 |
46 | - **Vite.js**
47 |
48 | Using Vite, you can rapidly set up and begin building and minifying your CSS and JavaScript.
49 |
50 | - **Tailwind CSS**
51 |
52 | Tailwind CSS is included by default, allowing you to quickly build custom designs.
53 |
54 | - **Debugging**
55 |
56 | Familiar debugging helper functions are integrated such as `dump()` and `dd()`.
57 |
58 | - **Clean UI**
59 |
60 | Enhance the WordPress dashboard and improves the [user experience](https://user-images.githubusercontent.com/499192/143415951-b01e9498-5f18-44dd-9d4b-51fb2d479a22.png) for clients.
61 |
62 | ## Installation
63 |
64 | Before using WordPlate, make sure you have PHP 8.2 and MySQL 8.0 installed on your computer. You'll also need to have Composer, a package manager for PHP, installed on your computer.
65 |
66 | To install WordPlate, open your terminal and enter the following command:
67 |
68 | ```sh
69 | composer create-project --prefer-dist vinkla/wordplate example-app
70 | ```
71 |
72 | After installing WordPlate, you'll need to update the database credentials in the `.env` file. This file is located in the root directory of your project. Open the file and update the following lines with your database credentials:
73 |
74 | ```env
75 | DB_NAME=database
76 | DB_USER=username
77 | DB_PASSWORD=password
78 | ```
79 |
80 | To run your WordPlate application, you may serve it using PHP's built-in web server. Open your terminal and navigate to the `public` directory of your project. Then, enter the following command:
81 |
82 | ```sh
83 | php -S 127.0.0.1:8000 -t public/
84 | ```
85 |
86 | Finally, open your web browser and visit the following URLs to view your WordPlate application:
87 |
88 | - [`http://127.0.0.1:8000/`](http://127.0.0.1:8000/) - Your website
89 | - [`http://127.0.0.1:8000/wordpress/wp-admin`](http://127.0.0.1:8000/wordpress/wp-admin) - The dashboard
90 |
91 | ## Configuration
92 |
93 | ### Public Directory
94 |
95 | After installing WordPlate, you'll need to configure your web server's document or web root to be the `public` directory. This is where the main entry point for your application, `index.php`, is located.
96 |
97 | By setting the `public` directory as your web server's document root, you ensure that all HTTP requests are routed through the front controller, which handles the requests and returns the appropriate responses.
98 |
99 | This configuration helps to improve the security and performance of your application by preventing direct access to files outside of the `public` directory.
100 |
101 | ### Environment Configuration
102 |
103 | WordPlate makes it easy to manage different configuration values based on the environment where your application is running. For example, you may need to use a different database locally than you do on your production server.
104 |
105 | To accomplish this, WordPlate uses the [`vlucas/phpdotenv`](https://github.com/vlucas/phpdotenv) PHP package. When you install WordPlate, a `.env.example` file is included in the root directory of your application. If you installed WordPlate via Composer, this file will automatically be renamed to `.env`. Otherwise, you should rename the file manually.
106 |
107 | It's important to note that your `.env` file should not be committed to your application's source control. This is because each developer or server using your application may require a different environment configuration. Additionally, committing your `.env` file to source control would be a security risk in the event that an intruder gains access to your repository, as any sensitive credentials would be exposed.
108 |
109 | To learn more about managing environment variables in WordPlate, you can refer to Laravel's documentation on the topic:
110 |
111 | - [Environment Variable Types](https://laravel.com/docs/12.x/configuration#environment-variable-types)
112 | - [Retrieving Environment Configuration](https://laravel.com/docs/12.x/configuration#retrieving-environment-configuration)
113 |
114 | ### Salt Keys
115 |
116 | It's important to add salt keys to your environment file. These keys are used to encrypt sensitive data, such as user sessions, and help to ensure the security of your application.
117 |
118 | If you don't set the salt keys, your user sessions and other encrypted data may be vulnerable to attacks. To make it easier to generate secure salt keys, we've created a [salt key generator](https://vinkla.github.io/salts/) that you can use. If you haven't already done so, copy the `.env.example` file to a new file named `.env`. Then visit the generator and copy the randomly generated keys to your `.env` file.
119 |
120 | ## Plugins
121 |
122 | ### WordPress Packagist
123 |
124 | WordPlate includes integration with [WordPress Packagist](https://wpackagist.org), a Composer repository that mirrors the WordPress plugin and theme directories. With this integration, you can install and manage plugins using Composer.
125 |
126 | To install a plugin, use `wpackagist-plugin` as the vendor name and the plugin slug as the package name. For example, to install the `clean-image-filenames` plugin, you would use the following command:
127 |
128 | ```bash
129 | composer require wpackagist-plugin/clean-image-filenames
130 | ```
131 |
132 | The installed packages will be located in the `public/plugins` directory.
133 |
134 | Here's an example of what your `composer.json` file might look like:
135 |
136 | ```json
137 | "require": {
138 | "wpackagist-plugin/clean-image-filenames": "^1.5"
139 | }
140 | ```
141 |
142 | For more information and examples, please visit the [WordPress Packagist website](https://wpackagist.org).
143 |
144 | ### Must Use Plugins
145 |
146 | [Must-use plugins](https://developer.wordpress.org/advanced-administration/plugins/mu-plugins/) (also known as mu-plugins) are a type of WordPress plugin that is installed in a special directory inside the content folder. These plugins are automatically enabled on all sites in the WordPress installation.
147 |
148 | To install plugins into the `mu-plugins` directory, add the plugin name to the `installer-paths` of your `composer.json` file:
149 |
150 | ```json
151 | "installer-paths": {
152 | "public/mu-plugins/{$name}": [
153 | "type:wordpress-muplugin",
154 | "wpackagist-plugin/clean-image-filenames",
155 | ]
156 | }
157 | ```
158 |
159 | To install the plugin, use `wpackagist-plugin` as the vendor name and the plugin slug as the package name:
160 |
161 | ```sh
162 | composer require wpackagist-plugin/clean-image-filenames
163 | ```
164 |
165 | The plugin will be installed in the `public/mu-plugins` directory.
166 |
167 | For more information on the must-use plugin autoloader, please refer to the [Bedrock documentation](https://roots.io/bedrock/docs/mu-plugin-autoloader/).
168 |
169 | ### Included Plugins
170 |
171 | #### [Headache](https://github.com/vinkla/headache)
172 |
173 | An easy-to-swallow painkiller plugin for WordPress. It removes a lot of default WordPress stuff you just can't wait to get rid of. It removes meta tags such as feeds, version numbers and emojis.
174 |
175 | #### [Clean Image Filenames](https://wordpress.org/plugins/clean-image-filenames/)
176 |
177 | The plugin automatically converts language accent characters in filenames when uploading to the media library. Characters are converted into browser and server friendly, non-accent characters.
178 |
179 | - `Räksmörgås.jpg` → `raksmorgas.jpg`
180 | - `Æblegrød_FTW!.gif` → `aeblegrod-ftw.gif`
181 | - `Château de Ferrières.png` → `chateau-de-ferrieres.png`
182 |
183 | ## Vite.js
184 |
185 | [Vite](https://vitejs.dev/) is a build tool that provides a faster and leaner development experience for modern web projects. It comes with sensible defaults and is highly extensible via its Plugin and JavaScript APIs with full typing support.
186 |
187 | ```sh
188 | # Start the dev server...
189 | npm run dev
190 |
191 | # Build for production...
192 | npm run build
193 | ```
194 |
195 | [Learn more about Vite's backend integration.](https://vitejs.dev/guide/backend-integration.html)
196 |
197 | ## Mail
198 |
199 | To set up custom SMTP credentials for sending emails in your WordPlate application, you need to configure the required environment variables in your `.env` file.
200 |
201 | ```env
202 | MAIL_HOST=127.0.0.1
203 | MAIL_PORT=2525
204 | MAIL_USERNAME=null
205 | MAIL_PASSWORD=null
206 | MAIL_ENCRYPTION=null
207 | MAIL_FROM_ADDRESS="hello@example.com"
208 | MAIL_FROM_NAME="Example"
209 | ```
210 |
211 | If you're using a local email service like Mailhog or Mailpit, you need to disable encryption by setting the `MAIL_ENCRYPTION` environment variable to `null`.
212 |
213 | ## FAQ
214 |
215 |
216 | Can I add WordPress constants to the environment file?
217 |
218 | This is possible by updating the `public/wp-config.php` file after the WordPlate application have been created.
219 |
220 | ```diff
221 | define('WP_DISABLE_FATAL_ERROR_HANDLER', env('WP_DISABLE_FATAL_ERROR_HANDLER', false));
222 |
223 | +define('WP_ALLOW_MULTISITE', env('WP_ALLOW_MULTISITE', true));
224 | ````
225 |
226 | Then you may add the constant to the `.env` file.
227 |
228 | ```diff
229 | WP_DEFAULT_THEME=wordplate
230 | +WP_ALLOW_MULTISITE=true
231 | ````
232 |
233 |
234 |
235 | Can I disable WP-Cron and set up a manual cron job?
236 |
237 | WordPlate allows you to disable the internal WordPress cron system via the `DISABLE_WP_CRON` environment variable:
238 |
239 | ```env
240 | DISABLE_WP_CRON=true
241 | ````
242 |
243 | It is recommended to manually set a cron job if you enable this setting and disable the WordPress cron. You'll need to add the following in your crontab file:
244 |
245 | ```sh
246 | */5 * * * * curl https://example.com/wp/wp-cron.php
247 | ````
248 |
249 |
250 |
251 | Can I install languages with Composer?
252 |
253 | If you want to install language packs using Composer, we recommend looking at the [WP Languages](https://wp-languages.github.io/) project. Below is an example of a `composer.json` file that installs the Swedish language pack for WordPress.
254 |
255 | ```json
256 | {
257 | "require": {
258 | "koodimonni-language/core-sv_se": "*",
259 | },
260 | "repositories": [
261 | {
262 | "type": "composer",
263 | "url": "https://wp-languages.github.io",
264 | "only": [
265 | "koodimonni-language/*"
266 | ]
267 | }
268 | ],
269 | "config": {
270 | "allow-plugins": {
271 | "koodimonni/composer-dropin-installer": true
272 | },
273 | },
274 | "extra": {
275 | "dropin-paths": {
276 | "public/languages/": [
277 | "vendor:koodimonni-language"
278 | ]
279 | }
280 | }
281 | }
282 | ```
283 |
284 |
285 |
286 | Can I rename the public directory?
287 |
288 | Update your `.gitignore`, `composer.json`, `.vite.config.js`, and `wp-cli.yml` files with the new path to the `public` directory. Then, run `composer update` in the root of your project.
289 |
290 |
291 | Can I rename the WordPress directory?
292 |
293 | By default WordPlate will put the WordPress in `public/wordpress`. If you want to change this there are a couple of steps you need to go through. Let's say you want to change the default WordPress location to `public/wp`:
294 |
295 | 1. Update the `wordpress-install-dir` path in your `composer.json` file.
296 |
297 | 1. Update `wordpress` to `wp` in `wordplate/public/.gitignore`.
298 |
299 | 1. Update the last line in the `public/index.php` file to:
300 |
301 | ```php
302 | require __DIR__.'/wp/wp-blog-header.php';
303 | ```
304 |
305 | 1. Update the `WP_DIR` environment variable in the `.env` file to `wp`.
306 |
307 | 1. If you're using WP-CLI, update the path in the `wp-cli.yml` file to `public/wp`.
308 |
309 | 1. Remove the `public/wordpress` directory if it exist and then run `composer update`.
310 |
311 |
312 | Can I rename the theme directory?
313 |
314 | For most applications you may leave the theme directory as it is. If you want to rename the `wordplate` theme to something else you'll also need to update the `WP_DEFAULT_THEME` environment variable in the `.env` file.
315 |
316 |
317 | Can I use WordPlate with Laravel Herd?
318 |
319 | If you're using Laravel Herd or Valet together with WordPlate, you may use our [custom driver](https://herd.laravel.com/docs/macos/extending-herd/custom-drivers):
320 |
321 | ```php
322 | isActualFile($staticFilePath)) {
340 | return $staticFilePath;
341 | }
342 |
343 | return false;
344 | }
345 |
346 | public function frontControllerPath(string $sitePath, string $siteName, string $uri): ?string
347 | {
348 | return parent::frontControllerPath(
349 | $sitePath . '/public',
350 | $siteName,
351 | $this->forceTrailingSlash($uri)
352 | );
353 | }
354 |
355 | private function forceTrailingSlash(string $uri)
356 | {
357 | if (substr($uri, -1 * strlen('/wordpress/wp-admin')) === '/wordpress/wp-admin') {
358 | header('Location: ' . $uri . '/');
359 | exit;
360 | }
361 |
362 | return $uri;
363 | }
364 |
365 | public function logFilesPaths()
366 | {
367 | return [
368 | '/public',
369 | ];
370 | }
371 | }
372 | ```
373 |
374 |
375 | Can I use WordPlate with Tinkerwell?
376 |
377 | If you're using Tinkerwell together with WordPlate, you may use our [custom driver](https://tinkerwell.app/docs/4/extending-tinkerwell/custom-drivers):
378 |
379 | ```php
380 |
401 |
402 | ## Upgrade Guide
403 |
404 |
405 | Upgrading from 11 to 12
406 |
407 | 1. The `wordplate/framework` package has been archived. Update the `composer.json` file:
408 |
409 | ```diff
410 | "require": {
411 | - "wordplate/framework": "^11.1",
412 | + "composer/installers": "^2.1",
413 | + "johnpbloch/wordpress-core-installer": "^2.0",
414 | + "johnpbloch/wordpress-core": "^6.0",
415 | + "roots/bedrock-autoloader": "^1.0",
416 | + "roots/wp-password-bcrypt": "^1.1",
417 | + "symfony/http-foundation": "^6.0",
418 | + "symfony/var-dumper": "^6.0",
419 | + "vlucas/phpdotenv": "^5.4"
420 | }
421 | ```
422 |
423 | 1. Replace your `public/wp-config.php` file with [the one in this repository](public/wp-config.php). Remember to save any custom constants defined in your `wp-config.php` file.
424 |
425 | 1. Add the [`src/helpers.php`](src/helpers.php) file from this repository and autoload it in the `composer.json` file:
426 |
427 | ```diff
428 | +"autoload": {
429 | + "files": [
430 | + "src/helpers.php"
431 | + ]
432 | +}
433 | ```
434 |
435 | 1. Run `composer update` in the root of your project.
436 |
437 |
438 |
439 | Upgrading from 10 to 11
440 |
441 | 1. WordPlate now requires PHP 8.0 or later.
442 |
443 | 1. Bump the version number in the `composer.json` file to `^11.0`.
444 |
445 | 1. Run `composer update` in the root of your project.
446 |
447 |
448 | Upgrading from 9 to 10
449 |
450 | 1. WordPlate now requires PHP 7.4 or later.
451 |
452 | 1. Bump the version number in the `composer.json` file to `^10.0`.
453 |
454 | 1. Rename `WP_ENV` to `WP_ENVIRONMENT_TYPE` in the environment file.
455 |
456 | 1. Rename `WP_THEME` to `WP_DEFAULT_THEME` in the environment file.
457 |
458 | 1. Rename `WP_URL` to `WP_HOME` in the environment file (if it exists).
459 |
460 | 1. If you're using the `WP_CACHE` environment variable you'll need to define it in the `public/wp-config.php` file:
461 |
462 | ```diff
463 | $application->run();
464 |
465 | +define('WP_CACHE', env('WP_CACHE', false));
466 |
467 | $table_prefix = env('DB_TABLE_PREFIX', 'wp_');
468 | ````
469 |
470 | 1. Optional: Rename `WP_PREFIX` to `DB_TABLE_PREFIX` in the following files:
471 |
472 | - `.env`
473 | - `.env.example`
474 | - `public/wp-config.php`
475 |
476 | 1. Run `composer update` in the root of your project.
477 |
478 |
479 | Upgrading from 8 to 9
480 |
481 | 1. Bump the version number in the `composer.json` file to `^9.0`.
482 |
483 | 1. Copy the `public/mu-plugins/mu-plugins.php` file into your project.
484 |
485 | 1. Update the `public/.gitignore` file to allow the new `mu-plugins.php` file:
486 |
487 | ```diff
488 | -mu-plugins/
489 | +mu-plugins/*
490 | +!mu-plugins/mu-plugins.php
491 | ````
492 |
493 | 1. Run `composer update` in the root of your project.
494 |
495 |
496 | Upgrading from 7 to 8
497 |
498 | 1. WordPlate now requires PHP 7.2 or later.
499 |
500 | 1. Bump the version number in the `composer.json` file to `^8.0`.
501 |
502 | > [!Note]
503 | > WordPlate 8.0 requires WordPress 5.3 or later.
504 |
505 | 1. Laravel's helper functions is now optional in WordPlate. If you want to use the functions, install the [`laravel/helpers`](https://github.com/laravel/helpers#readme) package, with Composer, in the root of your project:
506 |
507 | ```sh
508 | composer require laravel/helpers
509 | ```
510 |
511 | 1. Laravel's collections are now optional in WordPlate. If you want to use collections, install the [`tightenco/collect`](https://github.com/tightenco/collect#readme) package, with Composer, in the root of your project:
512 |
513 | ```sh
514 | composer require tightenco/collect
515 | ```
516 |
517 | 1. The `mix` helper function is now optional in WordPlate. If you want to use the function, install the [`ibox/mix-function`](https://github.com/juanem1/mix-function#readme) package, with Composer, in the root of your project:
518 |
519 | ```sh
520 | composer require ibox/mix-function
521 | ```
522 |
523 | 1. Replace any usage of `asset`, `stylesheet_url` and `template_url` functions with WordPress's [`get_theme_file_uri`](https://developer.wordpress.org/reference/functions/get_theme_file_uri/) function.
524 |
525 | 1. Replace any usage of `stylesheet_path` and `template_path` functions with WordPress's [`get_theme_file_path`](https://developer.wordpress.org/reference/functions/get_theme_file_path/) function .
526 |
527 | 1. The `base_path` and `template_slug` functions have been removed.
528 |
529 | 1. Run `composer update` in the root of your project.
530 |
531 |
532 | Upgrading from 6 to 7
533 |
534 | 1. Bump the version number in the `composer.json` file to `^7.0`.
535 |
536 | > [!Note]
537 | > WordPlate 7.0 requires WordPress 5.0 or later.
538 |
539 | 1. Update the `realpath(__DIR__)` to `realpath(__DIR__.'/../')` in the `wp-config.php` file.
540 |
541 | 1. If your public directory isn't named `public`, add the following line to the `wp-config.php` file:
542 |
543 | ```php
544 | $application->setPublicPath(realpath(__DIR__));
545 | ```
546 |
547 | 1. Run `composer update` in the root of your project.
548 |
549 |
550 | Upgrading from 5 to 6
551 |
552 | 1. Bump the version number in the `composer.json` file to `^6.0`.
553 |
554 | 1. Update the `realpath(__DIR__.'/../')` to `realpath(__DIR__)` in the `wp-config.php` file.
555 |
556 | 1. Run `composer update` in the root of your project.
557 |
558 |
559 | Upgrading from 4 to 5
560 |
561 | 1. Bump the version number in the `composer.json` file to `^5.0`.
562 |
563 | 1. Copy and paste the contents of the [`wp-config.php`](https://github.com/vinkla/wordplate/blob/e301f9b093efdbd1bdeeb61e2f99f86e23c36fb2/public/wp-config.php) file into your application.
564 |
565 | > [!Note]
566 | > Make sure you don't overwrite any of your custom constants.
567 |
568 | 1. Run `composer update` in the root of your project.
569 |
570 |
571 | ## Acknowledgements
572 |
573 | WordPlate wouldn't be possible without these amazing open-source projects.
574 |
575 | - [`composer/installers`](https://github.com/composer/installers)
576 | - [`motdotla/dotenv`](https://github.com/motdotla/dotenv)
577 | - [`outlandish/wpackagist`](https://github.com/outlandishideas/wpackagist)
578 | - [`roots/bedrock-autoloader`](https://github.com/roots/bedrock-autoloader)
579 | - [`roots/wordpress`](https://github.com/roots/wordpress)
580 | - [`symfony/http-foundation`](https://github.com/symfony/http-foundation)
581 | - [`symfony/var-dumper`](https://github.com/symfony/var-dumper)
582 | - [`tailwindlabs/tailwindcss`](https://github.com/tailwindlabs/tailwindcss)
583 | - [`upperdog/clean-image-filenames`](https://github.com/upperdog/clean-image-filenames)
584 | - [`vinkla/headache`](https://github.com/vinkla/headache)
585 | - [`vitejs/vite`](https://github.com/vitejs/vite)
586 | - [`vlucas/phpdotenv`](https://github.com/vlucas/phpdotenv)
587 |
588 | ## License
589 |
590 | The WordPlate package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
591 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://getcomposer.org/schema.json",
3 | "name": "vinkla/wordplate",
4 | "description": "The WordPlate boilerplate",
5 | "license": "MIT",
6 | "type": "project",
7 | "keywords": [
8 | "wordplate",
9 | "wordpress"
10 | ],
11 | "require": {
12 | "php": "^8.2",
13 | "composer/installers": "^2.3",
14 | "roots/bedrock-autoloader": "^1.0.4",
15 | "roots/wordpress": "^6.8.1",
16 | "symfony/http-foundation": "^7.2",
17 | "vinkla/headache": "^3.5",
18 | "vlucas/phpdotenv": "^5.6",
19 | "wpackagist-plugin/clean-image-filenames": "^1.5"
20 | },
21 | "require-dev": {
22 | "symfony/var-dumper": "^7.2"
23 | },
24 | "repositories": [
25 | {
26 | "type": "composer",
27 | "url": "https://wpackagist.org",
28 | "only": [
29 | "wpackagist-plugin/*",
30 | "wpackagist-theme/*"
31 | ]
32 | }
33 | ],
34 | "minimum-stability": "stable",
35 | "prefer-stable": true,
36 | "autoload": {
37 | "files": [
38 | "src/helpers.php"
39 | ]
40 | },
41 | "config": {
42 | "allow-plugins": {
43 | "composer/installers": true,
44 | "roots/wordpress-core-installer": true
45 | },
46 | "optimize-autoloader": true,
47 | "preferred-install": "dist",
48 | "sort-packages": true
49 | },
50 | "extra": {
51 | "installer-paths": {
52 | "public/mu-plugins/{$name}": [
53 | "type:wordpress-muplugin",
54 | "wpackagist-plugin/clean-image-filenames"
55 | ],
56 | "public/plugins/{$name}": [
57 | "type:wordpress-plugin"
58 | ],
59 | "public/themes/{$name}": [
60 | "type:wordpress-theme"
61 | ]
62 | },
63 | "wordpress-install-dir": "public/wordpress"
64 | },
65 | "scripts": {
66 | "post-root-package-install": [
67 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
68 | ]
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "module",
3 | "scripts": {
4 | "build": "vite build",
5 | "dev": "vite"
6 | },
7 | "dependencies": {
8 | "@tailwindcss/vite": "^4.1.7",
9 | "dotenv": "^16.5.0",
10 | "tailwindcss": "^4.1.7",
11 | "vite": "^6.3.5"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/public/.htaccess:
--------------------------------------------------------------------------------
1 | # BEGIN WordPress
2 |
3 | RewriteEngine On
4 | RewriteBase /
5 | RewriteRule ^index\.php$ - [L]
6 | RewriteCond %{REQUEST_FILENAME} !-f
7 | RewriteCond %{REQUEST_FILENAME} !-d
8 | RewriteRule . /index.php [L]
9 |
10 | # END WordPress
11 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vinkla/wordplate/542ed45d6d32a35d9c50647cdfe0e81c6d0c6c72/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 404
5 |
6 |
7 |
--------------------------------------------------------------------------------
/public/themes/wordplate/footer.php:
--------------------------------------------------------------------------------
1 |
2 |