You may learn how I install WordPress. Almost everything will come from Composer packages, the rest is under version control (git).
Thus the repository of a WordPress installation should barely contain files.
Please consider sponsoring me monthly if you use my packages in an agency.
Most of these files are excluded from this repository as they are installed by Composer!
/
: root directory with configuration files and documentsvendor/
: dependencies (packages)public/
: webserver's document root with index.php
, wp-config.php
, favicon.ico
public/$PROJECT_NAME/
: WordPress corepublic/wp-content/
: wp-content
directoryvendor/
UPGRADE.md
composer.json
composer.lock
wp-cli.yml
public/─┬─index.php (modified)
├─wp-config.php
├─PROJECT_NAME/─┬─index.php
│ ├─wp-load.php
│ ├─wp-login.php
│ ├─wp-admin/
│ └─wp-includes/
└─wp-content/
ffraenz/private-composer-installer
koodimonni/composer-dropin-installer
All other files - except public/wp-config.php
- should be kept under version control.
.gitignore
, composer.json
, public/index.php
, wp-cli.yml
composer.json
and create documents.env
if you have purchased pluginscomposer config github-oauth.github.com "$YOUR_GITHUB_TOKEN"
public/wp-config.php
including WP_CONTENT_DIR
and WP_CONTENT_URL
pointing to public/wp-content
, and loading vendor/autoload.php
WP_ENVIRONMENT_TYPE
environment variable
(in PHP-FPM configuration
or in public/wp-config.php
)composer update --no-dev
wp core install --title="WP" --admin_user="myname" --admin_email="user@example.com" --admin_password="12345"
wp option update home "https://example.com"
wp option update siteurl "https://example.com/project"
These are possible variations.
roots/wordpress-no-content
+ johnpbloch/wordpress-core-installer
johnpbloch/wordpress
repositories.package
with current ZIP file from wordpress.orgroots/wordpress
Packages provided by Roots point to wordpress.org ZIP files and git repositories.