I've readed that using some constant defined into the wp-config.php file is possible to use a custom folder instead of the default wp-content. The same thing if I've understood can be applied also to wp-admin folder. The constant are the following
//Rename wp-content folder
define ('WP_CONTENT_FOLDERNAME', 'Folder_Name');
//Define new directory path
define ('WP_CONTENT_DIR', ABSPATH . WP_CONTENT_FOLDERNAME);
//Define new directory URL
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_CONTENT_URL', WP_SITEURL . WP_CONTENT_FOLDERNAME);
I'm not sure if this will cause problem for wp-content folder, for the wp-admin this seems not work. Is this possible or I need to leave the things as is?
I've readed that using some constant defined into the wp-config.php file is possible to use a custom folder instead of the default wp-content. The same thing if I've understood can be applied also to wp-admin folder. The constant are the following
//Rename wp-content folder
define ('WP_CONTENT_FOLDERNAME', 'Folder_Name');
//Define new directory path
define ('WP_CONTENT_DIR', ABSPATH . WP_CONTENT_FOLDERNAME);
//Define new directory URL
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_CONTENT_URL', WP_SITEURL . WP_CONTENT_FOLDERNAME);
I'm not sure if this will cause problem for wp-content folder, for the wp-admin this seems not work. Is this possible or I need to leave the things as is?
To rename the wp-content and wp-admin folders in WordPress, you can use constants defined in the wp-config.php file. The following constants can be used to rename wp-content folder:
define('WP_CONTENT_FOLDERNAME', 'Folder_Name'); define('WP_CONTENT_DIR', ABSPATH . WP_CONTENT_FOLDERNAME); define('WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/' . WP_CONTENT_FOLDERNAME);
For wp-admin folder, renaming it using constants is not recommended as it may cause issues with WordPress core files. It is recommended to leave the wp-admin folder as is.
wp-admin
cannot be renamed, the accepted answer says it is not possible – Tom J Nowell ♦ Commented Aug 21, 2023 at 13:07