WEBFI-WordPress-How to Change the WordPress Database Prefix to Improve Security
Your WordPress database is the control center for your entire site because all of your information is stored there. Some people may try to hack your site if they know the database name. In this video, we will show you how to change the WordPress database prefix to improve your site’s security.
If you liked this video, then please Like and consider subscribing to our channel for more WordPress videos.
Text version of this tutorial:
http://www.wpbeginner.com/wp-tutorials/how-to-change-the-wordpress-database-prefix-to-improve-security/
Follow us on Twitter:
http://twitter.com/wpbeginner
Checkout our website for more WordPress Tutorials
http://www.wpbeginner.com/
Summary of this Tutorial:
Start by making a backup of your database.
Then go to your root directory and fid wp-config.php
Look for the table prefix and change it to something different
Now go to phpmyadmin and change the table names
Either click each table or copy the code below to update all of your tables.
RENAME table `wp_commentmeta` TO `wp_a123456_commentmeta`;
RENAME table `wp_comments` TO `wp_a123456_comments`;
RENAME table `wp_links` TO `wp_a123456_links`;
RENAME table `wp_options` TO `wp_a123456_options`;
RENAME table `wp_postmeta` TO `wp_a123456_postmeta`;
RENAME table `wp_posts` TO `wp_a123456_posts`;
RENAME table `wp_terms` TO `wp_a123456_terms`;
RENAME table `wp_term_relationships` TO `wp_a123456_term_relationships`;
RENAME table `wp_term_taxonomy` TO `wp_a123456_term_taxonomy`;
RENAME table `wp_usermeta` TO `wp_a123456_usermeta`;
RENAME table `wp_users` TO `wp_a123456_users`;
You may need to edit tables created by any plugins.
Next query the option table and select everything with a name starting with wp_ using the query below.
SELECT * FROM `wp_a123456_options` WHERE `option_name` LIKE ‘%wp_%’
As well for the usermeta table with a meta_key using wp_ using the query below and change to your new prefix
SELECT * FROM `wp_a123456_usermeta` WHERE `meta_key` LIKE ‘%wp_%’
Related Links:
How to do a database backup
http://www.wpbeginner.com/beginners-guide/how-to-make-a-wordpress-database-backup-manually/
source
Way too fast!
This is called WP Beginner? This is not a beginning tutorial. I appreciate what you're doing and all the other videos, though!! This topic is too complicated for 1:46 video, I think.
Can't you bypass this whole step by setting up the original WordPress installation and choose your table name then?
This is a fantastic tutorial. Tells you the exact steps with visuals. You have now been bookmarked.
Hackers can attacks your sure anytime. Seeing your video one can easily change his / her database prfix so that hackers can't make a easy search on database.
Do we have to leave the "wp_" prefix at the beginning or can we remove this altogether?
would you recommend to use plugin to do the job?
Actually there is a function in phpmyadmin (under the Structure tab, below the tables..) to replace your table prefixes….
Hmm.. the options table…. I only have one with wp_ prefix (wp_user_roles), the other ones are "wpuxss…" and "WPLANG"…. do I change those too?
Should i also change the UserMeta table called "dismissed_wp_pointer"…?
Wow, that was fast .. I got dizzy. I'm fine with the table updates – had to watch it 2-3 times .. but the 2nd part, updating via the %wp_% – you didn't show us how to update the results. no clue what to do here, and you didn't update one result for us to follow.. Clearly a video for Devs to Devs .. just sayin' #peace
Great video, to anyone who cant follow her well: http://www.wpbeginner.com/beginners-guide/beginners-guide-to-wordpress-database-management-with-phpmyadmin/ DON'T FORGET TO BACKUP (Yes I know this link is already posted)
I get a error stating "#1044 – Access denied for user ' to database 'information_schema" . May i know hoe to resolve this
too fast, so slow and steady 😉
Unable to understand. The way she presents the info is for advanced users.