How To Change the Name of the WordPress Plugins Folder

How To Change the Name of the WordPress Plugins Folder

People change the names of WordPress default folder names for various reason.  The main one is because it is believed that it makes their WordPress website more secure from hackers and malicious bots and probably the second-most popular reason is, well, just because…(some people just have to customize everything…lol).  In this article, you’ll find out how to change the default name of the WordPress plugins folder from “plugins” to whatever you want.

Be aware that by doing this not only do you have to go into your WordPress control panel and reactivate all your plugins, but you also might have to reconfigure the settings of some plugins. This is why it is best to rename WordPress folders when you install a new site, not after you have a site up and running, configured and with content.

Step 1:  Change the name of you plugins folder

For the purpose of this tutorial, we’ll rename our “plugins” folder to “fred”.

Open up your FTP client or pull up your web hosting control panel’s file manager and navigate to your plugins folder which is a sub-folder of your wp-content folder.  Then simply rename the “plugins” folder to whatever you want to name it.  Just be sure to name it with letters or numbers A-Z, 0-9.  It’s probably best to leave out any special characters, spaces, dashes and underscores.

Step 2:  Tell WordPress the folder’s new name and where it is

Now you have to tell wordpress what the new name of the folder is and where to find it.  This is simple and only requires 3 simple lines of code placed in your wp-config.php file, which will be in your root directory.  So, again, using your FTP client or your web hosting control panel’s file manager and download the wp-config.php file (if you’re using the file manager in your control panel, you may have the option to edit the file using a file editor right inside your file manager instead of downloading it, this is OK, too).

When you’ve opened your wp-config.php file, right at the top you’ll see the php opening tag. Right underneath that, place the following code. So the beginning of your wp-config.php file would now look like this…

<?php
//Change name of plugins folder
define('WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/wp-content/fred' );
define('WP_PLUGIN_URL', 'http://' . $_SERVER['SERVER_NAME'] . '/wp-content/fred');

Use the EXACT code above except change “fred” to whatever you renamed your plugins folder.

That’s it. But remember, not only do you have to go into your WordPress control panel and reactivate all your plugins, but you also might have to reconfigure the settings of some of your plugins. This is why it’s best to rename WordPress folders when you install a new site, not after you have a site up and running, configured and with content.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.