Change wp-content Folder

Sometimes we wonder if it is possible to rename wp-content folder? It is already common for wordpress user that wp-content is the folder for plugins and themes. So there is some trick to rename the folder to something else, in the following code , we are going to change wp-content to asset.


define ('WP_CONTENT_FOLDERNAME', 'asset');
define ('WP_CONTENT_DIR', ABSPATH . WP_CONTENT_FOLDERNAME) ;

define('WP_SITEURL', 'yourdomain');
define('WP_CONTENT_URL', WP_SITEURL . WP_CONTENT_FOLDERNAME);

– copy the code above
– open wp-config.php that located in wordpress root folder
– find “require_once(ABSPATH . ‘wp-settings.php’);”
– paste the code that you already copy above “require_once(ABSPATH . ‘wp-settings.php’);”
– save the file

Hope this will help you all.

Leave a Reply

Your email address will not be published. Required fields are marked *