How to change database prefix in WordPress

Almost everything that you do in WordPress is stored in databases. Your new plugins will use a database as well as the core WordPress system. Since databases contain all your information, it is important that you do everything you can to make it more secure.

Because more often than not, hackers use bots to search for security flaws in your website, it is not a good idea to have a default database name and prefix for your WP database.

If you had installed WordPress by yourself, you will remember that you had to input database information like the name of your new database, username, and a database prefix. Standard WordPress prefix for databases is wp_ and that is the one you want to change.

Change DB Prefix

PRICE: Free

Change DB Prefix

Before you do any changes, it would be a good idea to backup your databases and your WordPress installation. Now when you’re sure everything’s safe to work with, let’s see how to change the prefix with free Change DB prefix plugin.

  1. Go to Plugins->Add New
  2. Search for “Change DB Prefix”
  3. Install and activate the plugin
  4. Navigate to Settings -> Change DB Prefix

Before you can continue, you will have to make sure that your wp-config.php is writable and check that your databases have alter rights.

A simple way to check file permissions is using FTP client. If you connect to your server with an FTP client like FileZilla, you should find your wp-config.php file (which is located in the main directory), right-click on the file and choose “File Permissions” from the drop-down menu. There you can simply (un)check permissions and make the file writable.

Now you only have to write down the prefix you are changing (which is “wp_” if you haven’t used a custom one) and choose a new one. Don’t forget to save changes and you’re done.

To keep you working on security issues, we invite you to also check how to hide folders from public and how to limit access to your WordPress login page.

START YOUR OWN BLOG

This guide is an introduction to mastering the art of blogging. It provides easy to follow steps to start, maintain, and grow your blog.

Read the guide

Leave a Reply

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