WordPress.org

Forums

[resolved] Change table prefix of existing site with plugins (7 posts)

  1. joshkadis
    Member
    Posted 5 years ago #

    Hi,

    I'm going to implement some e-commerce on my existing WordPress site using Shopp (www.shopplugin.net), which has worked well so far on a private test site. But before launching the store, I want to change the db table prefixes on the live site from wp_ (I know I should have done this in the first place for security's sake)

    I've taken these steps (thanks to Sherif Elsisi http://tinyurl.com/ytjpe7):

    1. Change $table_prefix in wp-config.php
    2. Change db table names, including tables created by plugins
    3. Edit wp_options and wp_usermeta

    It worked for the core WordPress stuff, but not for some of my plugins. Is there anything I can do besides deleting and then reinstalling the plugins?

  2. MichaelH
    Member
    Posted 5 years ago #

    What about just deactivating then reactivating?

  3. joshkadis
    Member
    Posted 5 years ago #

    Would that recreate the plugins' tables with their existing entries and the new prefix?

  4. MichaelH
    Member
    Posted 5 years ago #

    Hard to say with looking at each individual plugin.

  5. joshkadis
    Member
    Posted 5 years ago #

    What about this:

    1. Export the old database
    2. Use a text editor to find-replace "wp_" with "newprefix_"
    3. Drop all the tables in the old database
    4. Import that database from step 2

    Would that kill any WordPress functions?

  6. MichaelH
    Member
    Posted 5 years ago #

    Sounds okay. What can it hurt since you have a backup of the database.

  7. joshkadis
    Member
    Posted 5 years ago #

    A couple plugins had their settings revert to default, but overall it went smoothly.

Topic Closed

This topic has been closed to new replies.

About this Topic