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

GabrieleMartini
  • 1,665
  • 2
  • 19
  • 26
user2670674
  • 87
  • 3
  • 14

1 Answers1

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

  • 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', 'http://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 – user2670674 Jan 31 '19 at 12:39