WordPress boilerplate with Composer
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
pkg:composer/nickkadutskyi/wp
Requires
- php: >=8.3
- ext-curl: *
- ext-exif: *
- ext-openssl: *
- symfony/dotenv: ^7.3
- symfony/flex: ^2.10
- wpackagist-plugin/akismet: dev-trunk
- wpackagist-theme/twentytwentyfive: *
Requires (Dev)
- humanmade/psalm-plugin-wordpress: ^3.1
- phpstan/phpstan: ^2.1
- szepeviktor/phpstan-wordpress: ^2.0
- vimeo/psalm: ^6.13
- wp-coding-standards/wpcs: ^3.3
README
WordPress boilerplate with Composer
- Manage configs via
.envfiles (symfony/dotenv) - WordPress core files are always separate from wp-content and are managed by WP-CLI
Initial Setup
composer create-project nickkadutskyi/wp
Update .env.$APP_ENV files
Provide .env.$APP_ENV.local files with sensitive data like DB credentials and SALT keys
Server Setup
Apache
Set DocumentRoot to public directory
You may add .htaccess in public/ directory or into <Directory> section
of your Apache config the following content:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Packages
- symfony/dotenv is used to manage environment variables
- symfony/flex is used for
composer dump-envcommand to create.env.local.phpfile during deployment for better performance - phpstan, psalm with their respective extensions for static analysis
- wp-coding-standards/wpcs with phpcs for code standards checking
- wpackagist-{plugin,theme} for managing WordPress plugins and themes via Composer