Change Prefixes in Your Database using phpmyadmin

There are several reasons why prefixes in your database need to be updated. Ensuring that your site is secure is the first reason your prefixes should be kept updated. SQL injections can be a huge issue, destroying the visibility and readability of your site. There is a great article about this issue over at WP White Security. The second most common reason to update your database prefixes is to ensure that your website functions properly after migrating it to a new hosting server. Your hosting company may use custom prefixes, which aren’t necessarily the same as those required to make sure your sight is working correctly.

There are several ways to change prefixes in your database which have a varying range of difficulty. We are going to show you one of the easier ways to do it which does require you to have access to phpmyadmin.

video transcript

Today on UV Design Tips and Tricks, we’re going to show you how to change your table prefixes, using phpmyadmin.

There are several different reasons why you want to change your prefixes in your database. One, because you did an install from Installatron or whatever other server application installation tool. They always use default ones. WordPress uses WP underscore. Joomla I believe is JOS underscore. Drupal has their own. You want to go ahead and change those for security reasons. That’s one reason.

The second reason why you need to change them is let’s say you import your site from a shared hosting platform to a managed WordPress platform. So for instance, GoDaddy has their managed WordPress platform. But they use specific prefixes for each install, so they already kind of take care of that for you. But if you import your database in there your tables, prefixes, are going to be the same. And they’re not going to match what they have at GoDaddy or whatever other type of hosting company you choose. And they might make you go ahead and change your prefixes yourself, or pay them to do it for you. So today we’re going to show you how to make those changes yourself.

All right. So this is actually a lot simpler than what a lot of people want to make it out to be. There’s lots of different ways to do this. I’m going to show you what I believe is the easiest and fastest way.

So you’re inside PHPmyadmin. There are different ways to get inside here. You might want to contact your hosting company on how to do that, or I might make a video to show you different ways to access PHPmyadmin. But for today, we assume you know how to get here, or can get here.

So you want to click on your database, and you’re going to see all your tables right here. You want to go ahead and click Check All and then you want to go down here to where it says Replace Table Prefix. And then you want to type in what it was. For WordPress it’s WP underscore. You can always make sure what is right here. And then what you’re going to change it to. So in this platform we can change it to whatever we want. So we’ll just kind of go with the name of the site.

We’ll call it, Just Fix It. And then underscore, because after this other underscore is the table names, and you want to keep those the same. So basically what this is going to do is a search and replace for the prefix, which is great.

Now let’s say you have managed WordPress, you have to know what it already is. So you just have to go to your WP config file and scroll down here. And it would show you right here. Table Prefix. This obviously is not a manage WordPress WP config file, but it would show you WP underscore, bunch of andom characters, underscore, and put that in there. And then just go ahead and hit Submit.

And there you go. So right now we have all the table names are still the same, just the prefixes. Here it’s still showing you the old ones. That’s perfectly fine, just go ahead refresh your web page. And it will actually pre-load, or re-reload I should say, with the new prefixes. Awesome.

So once this is done you go to your website and you refresh page and you’re going to get this. Because now WordPress doesn’t know that you updated the prefix tables. So now what we have to do is go inside your WP config file and there are different ways to access this file. File manager, FTP software, whatever you choose to do. It’s pretty easy to access. Go and update the table prefixed to what you change it to. Save.

And again, it needs to be whatever this is. Whatever you put in that second column. So matches up and then you go back to your website. And then now your website loads again. And it’s just that easy to change your table prefixes in your database.

If you liked this video, go ahead and hit the Like button. Make sure to subscribe, and we post weekly videos, tutorials on website design, website hosting, VPS and anything else. If you have any video ideas or suggestions, leave them in the comments. And we’ll talk to you later. Take it easy.

Check out our latest tutorial

Pin It on Pinterest

Share This