johnpbloch / wordpress

A fork of WordPress with Composer support added. Branches, tags, and trunk synced from upstream every 15 minutes.
https://packagist.org/packages/johnpbloch/wordpress
602 stars 102 forks source link

Installing Wordpress in public root #54

Open bravomediamats opened 2 years ago

bravomediamats commented 2 years ago

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?