wordpress icon indicating copy to clipboard operation
wordpress copied to clipboard

Installing Wordpress in public root

Open bravomediamats opened this issue 3 years ago • 0 comments

This has been discussed multiple times, and the solution with a composer script to copy the contents from a subfolder into root will work just fine. I just wanted to share a discovery with composer config-settings that might help somebody.

If i specify that the vendor-dir should be hosted within the same folder as the wordpress-install-dir, composer does not remove the contents of the folder.

For eg. this composer.json: { "config": { "vendor-dir": "public/vendor" }, "require": { "johnpbloch/wordpress": "^5.9" }, "extra": { "wordpress-install-dir": "public" } }

That being said, the vendor folder should not be hosted within the public folder. But since this setting does not remove the contents of the public folder when installing wordpress there, then there might be some other setting to achieve the same result?

bravomediamats avatar Feb 14 '22 08:02 bravomediamats