Externalizing WordPress WP-CONTENT folder
Here is a quick tip on How to externalize your WordPress WP-CONTENT folder by simply adding this line of code on your WP-CONFIG file
define('WP-CONTENT-DIR', '/domains/your-domain.com/core'); /** location of your new directory for wp-content **/ define('WP-CONTENT-URL', 'http://your-domain.com/core'); /** absolute URL of the new location **/
Once you have applied this make sure to check all your absolute URL’s on your WordPress theme and Images to avoid deadlinks or misconfigured settings
This is also an additional security for your site by moving all the files and folder to a new folder and defining it hackers will have more difficulty cracking your site.
Applying this is much easier when you’re using SSH Terminal by just simply typing this code it will move all your directory and files immediately rather than dragging and dropping using FTP or SFTP
mv -u wp-content/* /domains/digitalfilipino.com/html/core/
the code above depends on the structure of your server directory, this will move all your files and folders immediately once applying this code on the terminal/putty ssh and also you must be on the root directory to move the WP-CONTENT or else you will add additional something like this (*depends on your server)
mv -u /domains/your-domain.com/wp-content/* /domains/your-domain.com/core/
additional info if your running on an addon domain it might also be different approach just always check your folder structures.