Composer setup to separate Wordpress core files from themes and plugins.
Moves Wordpress core to a separate folder (/wp/
by default).
- Duplicate
sample.wp-config.php
towp-config.php
- Edit
WP_SITE_PATH
with site path (i.ehttp://localhost/PATH_TO_SITE
, no trailing slash) - Configure database settings
- Replace salt (secret-key service)
- Duplicate
sample.htaccess
to.htaccess
- If accessing site via http://localhost/:
UncommentRewriteBase
and editPATH_TO_SITE
(same asPATH_TO_SITE
inwp-config.php
, but withouthttp://localhost/
and with trailing slash).
Copy theme and plugin folders to /wp-content/themes/
and /wp-content/plugins/
.
Run ~$ composer install
to install Wordpress to the /wp/
folder.
If not already activated, login to the Wordpress admin (http://localhost/PATH_TO_SITE/wp-admin/
). From the sidebar go to Appearance > Themes
, and activate the theme.
By default, Wordpress core will be installed inside /wp/. To modify the install path, you'll need to edit a few paths.
- Theme and plugins inside
/wp-content/
. - Whitelist plugins and themes in
.gitignore
.