0

I am trying to change the default path of the WP default directories such as wp-content, wp-include etc to avoid wpscan. I have tried using plugin would it possible to perform the same using manual techniques. I am using apache as a web server.

An example, I have tried:

RewriteRule ^cms_plugins/(.+) /wordpress/wp-content/plugins/$1 [L,QSA]

Thanks

1 Answer 1

2

Try the following steps to rename WP-Content Folder

  1. Download the WP-Config.php file
  2. Open and Edit the Wp-Config.php file to add the below line

    define( 'WP_CONTENT_FOLDERNAME', ‘new_directry_name’ );

  3. Change 'new_directory_name' to the name you want for your content folder.

  4. Upload WP-Config.php file back to your server

Follow these steps to replace the WP_Content folder

  1. Download WP-Config.php file
  2. Open and add the below lines

    define( 'WP_CONTENT_DIR', ‘new_directry_local_path’ );

    define( 'WP_CONTENT_URL', 'http://new_directry_url' );

  3. Change new_directory_local_path and http://new_directory_url to your local path and URL.

  4. Upload back to your server

1
  • I have tried using the same but when I load the application it didn't load the theme. define( 'WP_CONTENT_DIR', dirname(FILE) . '/var/www/html/wp_folder/wp-content'); define( 'WP_CONTENT_URL', '192.168.1.10/wp_folder/wp-content'); whereas my default directory is /var/www/html/wordpress/ I have uploaded the content in a different directory and gave the path. Can you please give more information. Thanks Commented Jan 31, 2019 at 12:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.