Increasing Security

It’s well known that WordPress is not the most secure of platforms, which makes is semi-undesirable to those who otherwise might be very attracted to the platform. Luckily, there are a few things you can do to increase that security.

The first thing you can do is to change the username and password. The username should not include any form of the word “administrator” or any form of variation of the company name and/or url. The same rules apply to the password. The password should also include at least one number, at least one “symbol” (.,!@…), and at leat one special character. Essentially, no one should be able to guess your username and password based on the website itself.

The second thing you can do is to change the table prefix – that is changing the table prefix from “wp_” to something a bit more random and a bit more unique. The nice thing is that this isn’t something you’ll have to type out a bunch of times, so it can be as unique as you’d like.

How to Change the WordPress Table Prefix

You’ll need access to your wp_config.php file and database to complete these steps.

Database Backup

The first thing you should do is backup your database. If you’re doing this after you’ve already set up your site, please note that your site could be down while you complete the following steps.

Change wp_config.php

Next, change table prefix in wp_config.php to something unique. This new prefix can only consist of numbers and letters. For example, you might change it to “wp_7el94_” rather than the standard “wp_table.”

$table_prefix = 'wp_7e194_';

Change Table Names

Next you’ll go into your database and change the table names to that you specified in the config file. The easiest way to do this is to use phpMyAdmin. There are just enough default tables to be annoying to change manually, so rather than do it that way, it’s easiest to use the SQL query provided by WP Beginner to change the table names. Just click the necessary database name, then hit “SQL.” You might need to modify this to suit your specific needs.

RENAME table `wp_commentmeta` TO `wp_7e194_commentmeta`;
RENAME table `wp_comments` TO `wp_7e194_comments`;
RENAME table `wp_links` TO `wwp_7e194_links`;
RENAME table `wp_options` TO `wp_7e194_options`;
RENAME table `wp_postmeta` TO `wp_7e194_postmeta`;
RENAME table `wp_posts` TO `wp_7e194_posts`;
RENAME table `wp_terms` TO `wp_7e194_terms`;
RENAME table `wp_term_relationships` TO `wp_7e194_term_relationships`;
RENAME table `wp_term_taxonomy` TO `wp_7e194_term_taxonomy`;
RENAME table `wp_usermeta` TO `wp_7e194_usermeta`;
RENAME table `wp_users` TO `wp_7e194_users`;

Change Options Table

After you changed the actual table names, you’ll need to change the option table. You can easily do this by doing another SQL query to find any options with a name that needs to be changed from the default to the new unique name. Again, we’ll use a query from WP Beginner to do this.

SELECT * FROM `wp_7e194_options` WHERE `option_name` LIKE '%wp_%';

Just manually change all the options that include “wp_” as their prefix.

Change UserMeta Table

We’ll need to do the same thing for the UserMeta table that we did for the options table. We’ll just modify the options query to meet our UserMeta requirement.

SELECT * FROM `wp_7e194_usermeta` WHERE `meta_key` LIKE '%wp_%';

Again, change all the options with “wp_” as the prefix to your new table prefix.


If you have not done so yet, upload your config file and test your site. Be sure to clear you cache to ensure everything was done correctly and you’re not getting any errors.