WebAnaya - Web Development & Digital Marketing Agency
Back to Blog
How To
WebAnaya TeamWebAnaya Team

How to rename WordPress tables prefix?

Replacing table prefix

Renaming the default WordPress tables prefix is one of the very important step to secure your WordPress from hacker.

There are two methods  to alter or rename WordPress tables prefix:

First Method :- To replace, rename or alter table prefix via Phpmyadmin Application table structure options.

1. Access your phypmyadmin
2. Select your database
3. In table structure check all tables from bottom as shown in screenshot 1.1
4. And choose replace table prefix option
5. To replace default WP_ prefix: Type wp in From input box and To input box type your preferred prefix for example ra_ and submit

Replacing table prefix
Replacing table prefix

Now you have successfully replaced default WordPress table prefix wp_ to your preferred table prefix.

Second Method :- To replace, rename or alter table prefix via Phpmyadmin sql commands.

Similarly if you wish you can run sql command to replace table prefix of a WordPress installation.

Syntax to replace table prefix

ALTER TABLE `fromprefix_table_name` RENAME `toprefix_table_name`;

 Example to replace a table prefix

ALTER TABLE `wp_links` RENAME `wp_links`;

Like above you have to execute the above mentioned syntax for each tables of your WordPress database.To run a sql command in phpmyadmin click on sql option from top option, write your sql code in sql   and to execute it click on go button  as shown in figure 1.2.

Figure 1.2: Phpmyadmin run sql command
Figure 1.2: Phpmyadmin run sql command

In each syntax write from prefix table name and to prefix table name correctly. Please note prefix always end with an underscore so don’t forget to put underscore between prefix and actual table name.

Related Posts

How to install Ghost on Zpanel with multiple instances?

Ghost is an incredibly stand alone modern designed just for blogging platform, while using it gives you pleasure, installing it for beginner is a little hectic. I am assuming if you are reading this relevant post then you must have a VPS/Dedicated ready server or if you are testing on local virtual machine then your […]

How to change sleep mode timings in Windows 7
January 6, 2014WebAnaya TeamHow To

In many cases you may want to change sleep mode of your windows 7 running pc or laptop i.e. Automatic system failure or BSOD (Blue screen of death). To change the sleep mode in Windows 7 follow below steps. Step 1. Open Control Panel from windows 7 start icon Step 2. Go to search bar […]

See old notifications in Android 4.3 and most recent version of Android

Notification feature is one of the key feature of Android running smartphones this give you an instant update from the apps on real time, to see new notification you can slide down the notification bar to see all new notifications and quickly jump onto detail of notification by tapping on a particular notification message. The […]