How To Change WordPress Database Table Prefix

Why do we want to change this wordpress database table name prefix?

It’s because when you installed WordPress by default, all of your database tables start with wp_.

Hackers know it, so they can potentially do SQL injection, putting junk scripts into your database automatically.

If you are a blogger who wants to secure your database, you are going to change wp table prefix.

So for example, replacing wp_ to lolol_.  I know it is a silly prefix but i want to point out that you can only use letters and numbers, but not special characters such as period, coma, etc.

//Do Back up your database first, as it’s a little bit complicated (see my post about backup wordpress database in 2 minutes). The best way is you try it in your local wordpress installation. If you still don’t have it, you can check this post for mac user and this post for windows user.

It’s really a good idea to change the database prefix while you are installing wordpress, so you will have no hassle to change it later on. But if you already have it installed, we can do it manually.

There is also a plugin called wp prefix changer,  i have tried it but it didn’t work, so i do change it manually. For some of you who had experience with this plugin and it works, feel free to leave a comment :)

Share the knowledge
Share on Google+0Tweet about this on TwitterShare on Facebook0Pin on Pinterest0Share on Reddit0Email this to someonePrint this page