WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] database prefix change (5 posts)

  1. ClaytonJames
    Member
    Posted 6 years ago #

    I was experimenting with different ways of changing database prefixes today (the plugin method would not work for me). Being the type of person who always tries to take the path of least resistance, I exported my database, opened it in an editor and did a "Find and Replace All" on "wp_". I then edited wp-config to reflect the change, deleted the original database tables and imported my updated database. The only odd effect I suffered was having to re-apply my custom page templates, and the settings for one plugin.

    This seems way too easy, so before I break my own arm by patting myself on the back, I thought I should seek wiser opinions...

    Is anyone aware of any ill effects or possible insecurities that I may have introduced by doing it this way, as opposed to starting with a clean install?

  2. whooami
    Member
    Posted 6 years ago #

    ill effects? no

    insecurities? what would have you believe that there might be?

    Its a name, it matters not what you call it, as long as WP can find it. Whether you change one or all of them.

    You can do all of that inside phpmyadmin though, rename tables that is. no need to export.. etc..

  3. t3ch33
    Member
    Posted 6 years ago #

    as long as you update the prefix in pages that call it, then there are not bad effects. i recently did this last week, and my only problem was trying to find out which field in the db was still looking for wp_. i got it all fixed, though.

  4. SimonJ
    Member
    Posted 6 years ago #

    From what I can tell, there is only 4 fields in the database where you can find mention of the prefix :

    In wp_options :
    wp_user_roles

    In wp_usermeta :
    wp_capabilities
    wp_user_level
    wp_autosave_draft_ids

    Just change these wp_ for the new prefix as well and everyting gonna be all right.

    That's all.

    S.

  5. ClaytonJames
    Member
    Posted 6 years ago #

    Nice! Thanks everyone. I just needed a little reassurance, I guess. :-)

Topic Closed

This topic has been closed to new replies.

About this Topic