WP Smith

Creating WordPress & Genesis Websites Since 2010

  • Home
  • About
  • Services
  • Blog
  • Contact

Jul 06 2010

Pictorial Tutorial on WordPress Security: Change the WP_ Prefix

The best and most advisable way to do this is to use the plugin called WP Security Scan by Semper Fi Web Design. However, for some people the database table name prefix changing functionality of WP Security Scan doesn’t work. If that is the case, here is how you can do it manually.

1. Deactivate your plugins if you have already installed and activated your plugins.

wordpress security change wp prefix
Click for a Larger Image

2. Backup your wordpress database to a SQL file. If you used Fantastico when you installed your WordPress, it should have told you what the name of the database was. Simply log into PHPMyAdmin, and select that database. When you select that database, you should see something like this: To backup your SQL database, simply go to EXPORT, and then ensure that SQL is selected on the left side, and then click GO. Save the file to whatever location (but remember that location).

wordpress security change wp prefix
Click for a Larger Image

3. First make a second copy of the SQL. To do this, simply click on the file and hit CTRL + C and then CTL + V. This should create the second file with name of "Copy of mySQL.sql". Open the first *.sql file using text editor (using a PC, Notepad ++ is great!; Mac, TextMate is good), then find and replace all “wp_” prefix to “something_” (make sure it is in lower case). If you haven't done anything with your blog, then there should be about 50 changes that were made. If there was more then, no worries!

4. Now, you want to drop all tables of your wordpress databases without dropping the database entirely. To do this, simply click on your database on the left side in the blueish sidebar or click STRUCTURE.

wordpress security change wp prefix
Click for a Larger Image

And this will bring you back to the first screen you saw.

wordpress security change wp prefix
Click for a Larger Image

Click CHECK ALL and then change the dropbox "With Selected" to "Drop".

wordpress security change wp prefix
Click for a Larger Image

Which will bring up this screen:

wordpress security change wp prefix
Click for a Larger Image

Click Yes.

5. Next you want to import the *.sql file which has been edited before into your wordpress databases. To do this, simply go to IMPORT, browse and select the appropriate file.

wordpress security change wp prefix
Click for a Larger Image

6. Edit your wp-config.php file and change the $table_prefix = ‘wp_’; to $table_prefix = ‘something_’;. Typically this will be line 57 (if your wp-config is double-spaced, check line 114-ish or just search for it). Then you are all set! If you are still uncomfortable, I will be glad to help you. Just drop me a note.

Written by Travis Smith · Categorized: Tutorials

StudioPress Premium WordPress Themes     WP Engine Managed WordPress Hosting

What can I do for you!?

Custom Development

We develop plugins by determining both business/functional and technical requirements, following WordPress development best practices, and using agile methodology to ensure you get the best solution.

Consulting

Have questions? Need a reliable developer to consult? Please contact us today!

Customized Theme

We can customize your theme or child theme, or create a child theme for you based on your needs while enhancing the performance of every individual attribute.

Customized Plugin

We can customize your plugins, extend plugins (e.g., Gravity Forms, Jetpack, Soliloquy) based on your needs ensuring security, performance, and positive business impact.

Contact Us

About Travis Smith

As a WordPress enthusiast, developer, and speaker, Travis writes about what he learns in WordPress trying to help other WordPress travelers, beginners and enthusiasts with tutorials, explanations, & demonstrations.

Comments

  1. Frank says

    January 8, 2014 at 3:22 am

    Thank you so much also for pictures of tutorial
    Ps check link to Larger Image because are incorrect

    Reply

Leave a Reply Cancel reply

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

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

  • Twitter
  • Facebook
  • LinkedIn
  • Google+
  • RSS

Copyright © 2025 � WP Smith on Genesis on Genesis Framework � WordPress � Log in