Skip to content
Switch branches/tags
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

How to Install WordPress core in a Subdirectory using Composer ?

We all like WordPress, but personally I do not want to see all the main WordPress core files in the root of the site, because if manages multiple WordPress sites on the same web server, it is important to keep organized your installs, it looks messy and unprofessional or you may not want to install WordPress at the root of your website. In any case, fortunately, WordPress gives us the flexibility to install the WordPress core in a custom subdirectory. This adjustment gives us more security and also to avoid frequent pitfalls.

There are many ways to implement WordPress core in a Subdirectory, but WordPress itself has a great article on the Codex “Giving WordPress Its Own Directory”, but I thought do something a bit different with composer’s dependencies. In the last article, I explained the method of installing the composer and how to use it for WordPress Plugin and themes.

You can find full code explanation here :


No description, website, or topics provided.



No releases published


No packages published