wpvidZ

Learn WordPress With Video Tutorials

  • Blog
  • Browse
    • Backup & Restore
    • WordPress Localhost
    • WordPress Hosting
    • WordPress themes
    • Version Updates
    • Plugin Tips
    • Security
    • Tutorials
    • WordPress SEO
    • WP Miscellaneous
    • Sitemap
  • WP 5+ Tutorial
  • Search
wpvidZ Blog Tutorials How To Change WordPress Database Table Prefix

Tutorials

How To Change WordPress Database Table Prefix

Last updated on February 18, 2017
Posted on May 3, 2010

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 🙂

  • Is my site loading fast? I use this shared hosting
  • Try my theme >
get how prefix to Wordpress wp

Latest Posts

  • Twenty Nineteen Theme Full Tutorial – Creating a Website
  • Uninstall W3 Total Cache Plugin – Incredibly Easy!
  • Create WordPress Website 2018 on SiteGround Genesis
  • WordPress Noopener Noreferrer Rel Attribute Quick Fix
  • WordPress CDN Setup with MaxCDN and W3 Total Cache Plugin
  • Twenty Seventeen One Page Parallax Scrolling Website Style
  • How To Add Google Map in WordPress Contact Page
  • WordPress 4.7 Justify Text and Underline
  • Twenty Seventeen Footer “Proudly Powered By WordPress” Text
  • How To Add YouTube Subscribe Button To WordPress Website
← Multiple Blog Posts In WordPress
→ How To Add YouTube To Sidebar WordPress

Comments

  1. Tony says

    May 17, 2010 at 2:47 pm

    Hey there great article.. How long would it take to change the tables on a site that has about 400 articles..

    Can you email me please with the answer, thanks for your time

    • Kimi says

      May 17, 2010 at 4:26 pm

      Hey Tony, sure i can email you.

  2. Tony says

    May 17, 2010 at 6:16 pm

    hey its ok.. i did it.. thanks anyway

    • Kimi says

      May 18, 2010 at 6:51 am

      Awesome Tony! you are very welcome

  3. Jack says

    June 2, 2010 at 1:19 am

    The video worked perfectly, thank you !

    • Kimi says

      June 2, 2010 at 1:28 am

      Hello Jack,

      You’re very welcome! So glad it works out, Matilda is sooooo pretty 😀 Good luck with new life. If you want to have a picture in your avatar, this video might help you too.

      Have fun when family from Aussie comes 🙂 🙂

  4. Jack says

    June 2, 2010 at 1:50 am

    Ah an avatar, that sounds like a great idea. I’ll give it a go tomorrow. Thank you for the kind words!

    And yes we look forward to their arrival 😉

    • Kimi says

      June 2, 2010 at 10:16 am

      Yes, if you are into blogging community, and want to comment alot in any blogs, it would be much better showing your logo image or any images than default avatar 😀 I agree with you, take the time and you will be fine. Greetings!

  5. Aspen says

    September 6, 2010 at 5:04 am

    Thank you soo much. You are an excellent trainer 🙂

    Gratitude
    Aspen

  6. Ben says

    September 13, 2010 at 6:34 pm

    Hi, thank you so much for this, it saved me so much time and rescued me from hours of trawling the internet for this information. I have bookmarked your site and will be checking back regularly!

    • Kimi says

      September 13, 2010 at 6:56 pm

      Hello Ben, you’re very welcome.

      I am glad the post was useful. Cheers.

  7. Kev Jaffray says

    February 19, 2011 at 12:45 pm

    Hi Kimi, I found your video to be a great help in fixing a prefix error in a wordpress database I was having trouble with. Thank you for taking the time to make it and share. Best wishes, Kev

    • Kimi says

      February 22, 2011 at 7:26 am

      Hi Kev!

      I am so glad the video could help you, and the most part, you fixed your database prefix error, the database itself is very crucial to our blogs.

      Thanks so much for leaving your nice comment,

      Have a great week, Kev!

      Kimi.

  8. Keith Davis says

    February 20, 2011 at 3:59 pm

    Hi Kimi
    Great video.
    Never had the confidence to change my database prefix but this video may give me that confidence.

    Thanks for a super vid.

    • Kimi says

      February 22, 2011 at 7:31 am

      Keith!

      Did you manage to change all the database prefix? Honestly, I am still afraid if I had to change my database prefix, but I suggest everyone to backup database first, just incase..

      I hope your database has any prefix you want by now.

      Thanks, Keith!

      Kimi.

  9. Andreas says

    May 9, 2011 at 7:11 pm

    Excellent tutorial! Thanks a lot for making this available. The only one thing that remains to be mentioned is that you may only use letters, numbers and underscore. I had to do it all over again, because I used a prefix that contained a special character. 😉

    Also, it’s definitely not a bad idea to put your site into maintenance mode before to work on the database.

    Man, I am really happy it worked so smoothly.

    Thanks a lot!
    Andreas

  10. Paul says

    June 5, 2011 at 11:53 am

    Thanks, Kimi. Worked perfectly.

    One suggestion. You could just copy the tables to the same db but with the new names using phpmyadmin. Then, no need to backup!

    Just a thought.

    Paul

  11. Gowtham says

    June 11, 2011 at 5:47 am

    Thanks for the tutorial. But will there be any issues, if i download the complete database and open it will a text editor and find and replace all the “wp_” to a new prefix and upload the file again?

    • Kimi says

      June 11, 2011 at 8:05 pm

      Yes, there will always be issues if you do it incorrectly Gowtham.

      I suggest you to copy your site with the exact database in your PC or Mac, see this post: https://www.wpvidz.com/copy-live-wordpress-blog-to-computer/

      That post I use to copy this blog in my localhost, and then you can try to change your database one by one, and see how it works, if you change all correctly, your blog in localhost will be fine, if not, then something is done incorrect. But at least, your “online” blog will still work, only site in localhost breaks.

      I hope this work.

      • Gowtham says

        June 12, 2011 at 6:28 am

        I greatly appreciate your detailed reply. I took a backup of my database and all the files and set it up on my localhost using WAMP, then what i did was i took sql database and replaced all the “wp_” with a new prefix and uploaded in my localhost Database. And it worked. The only thing, was that there was a error showing up in the widget area, so then i placed new widgets and the error disappeared.

        I did the same with the live server, and it worked. One thing is that if people want to do it this way, they need to make sure that, they shouldn’t upgrade wordpress in the process.

  12. vinodh says

    November 9, 2011 at 11:02 am

    This helped me a lot. thanks

  13. Elizabeth says

    December 12, 2011 at 6:53 am

    You’re totally fabulous for creating this video. Gosh I appreciate this so much. Works perfectly.

  14. Chris Converse says

    August 16, 2012 at 3:37 am

    thank you for this tutorial. it allowed me to migrate our blog to our company server!

  15. Matt says

    December 13, 2012 at 10:40 am

    Thank you so much for this tut! You helped me with something that was taken me ages. Now my site is safe and I’ve learnt something new. Really REALLY appreciate it Kimi. X

Comment form on this post is closed after 60 days.

Search

Worth Reading

  • WordPress CDN setupWordPress CDN Setup with MaxCDN and W3 Total Cache Plugin
  • WordPress Google maps in contact pageHow To Add Google Map in WordPress Contact Page
  • The configuration of YouTube Subscribe button in Google Developers web pageHow To Add YouTube Subscribe Button To WordPress Website
  • Adding Social Media Links to WordPress Menu With CSS Classes
  • Unable to create directory wp-content/uploads in WordPress
  • Forward Twitter to Facebook Using App and Feedburner Tutorial
  • Kitchen Sink WordPress - Seem Simple But Important
  • Admin Pointers, Drag and Drop WordPress 3.3 Media Upload Features
  • How to sell ebook in a wordpress blog?
  • Check your site's performance using Google labs Page Speed

Backup & Restore

Backup WordPress Without a Plugin or FTP

Export WordPress Database using phpMyAdmin

BigDump Alternative – When BigDump Failed Importing Large WP Database

At This Place The Current Query Includes More Than 300 Dump Lines

View All..

Live Online Website

View All..

Offline Installation

How to Upload WordPress localhost to live server manually

Steps to Install WordPress on Windows 8 and WAMP 2.4

Install WordPress on Mavericks OS X 2014

Maximum upload file size in WAMP WordPress

View All..


WPvidz Hosting Image

  • About Me
  • Contact
  • Affiliate Disclosure
  • Privacy Policy
  • Term of Use

Copyright© 2023 wpvidz.com SG2021 | sitemap.xml


WPvidz.com is independent from WordPress.org but is proudly powered by WordPress & its block-based editor (Gutenberg)

WpvidZ.com uses cookies" to give you the best browsing experience possible. If you click "I Accept" below then you are consenting to this. For more information about your privacy settings on this website, please visit the Privacy Policy page. I Accept