Is there a way to move wordpress out of the public html directory?
The PHP files responsible for generating html output should be hosted but the php files responsible for database connections and other logic should not be hosted. They can be included by the hosted files in the following way: ../../NotPublic/wp-admin/...
Symfony does this and actually has only one hosted php. For more explanation as to why this would be a good idea you can check out this video.
I’ve tried to find instructions on how to do this but cannot find it. Worpress seems to have trouble making a distinction of php files generating output that need to be in the public directory and those that do stuff and should not be able to be requested through the web server (only as includes).
Currently I can use .htaccess to not list the directories or host any of the wp-content directories except wp-content/uploads