WordPress.org

Ready to get started?Download WordPress

Forums

table_prefix problem after upgrade (5 posts)

  1. AKCarlow
    Member
    Posted 11 months ago #

    My WP site is hosted on a Parallels virtual machine hosted at Blacknight. I used their control panel to upgrade to 3.8.1 - it was 3.6.something. I had previously used AIOWPS to change the database prefix, but the update changed the table_prefix entry in the wp_config file back to wp_. The result is an empty WP with just the default Hello World page.
    In the database there are two sets of tables, one with the wp_ prefix and one with the more secure prefix. I have edited in the database the wp_posts table and changed the post name from Hello world to Bonjour, and the change shows up on the web page, so WP access to the database is working. But if I change the table_prefix entry in the wp_config file from wp_ to the more secure prefix, the web page just comes up blank. What am I missing?

  2. bemdesign
    Member
    Posted 11 months ago #

    You used a server control panel's preconfigured script to run your WordPress update as opposed to logging into your WordPress site and updating from the Admin screen? Yeah, this would mess up your wp-config file!

    What I would suggest is have your hosting revert to the old site via backups (your hosting plan does backups right?). Then instead of using the server's control panel do it's preconfigured script, login to your WordPress admin and run the update there.

    If your server doesn't allow for WordPress updates that way, your next best option would be to download the latest WordPress version, unzip the WordPress folder that gets downloaded and then manually upload and replace the files/folders on your server with these new WordPress files *except* the wp-content folder. And you'll have accomplished a manual WordPress upgrade.

  3. AKCarlow
    Member
    Posted 11 months ago #

    Yes, but ...

    What I can't understand is why, since the updated WordPress can correctly access the database using the wp_ prefix, it can't access it using the other prefix when I change it in table_prefix in wp-config. All the other settings in wp-config (name, user, password, host etc) remain the same. The wp-content folder still has the various plugins I use.

  4. JumboClicks
    Member
    Posted 11 months ago #

    well that kinda sucks you would think if it read the config file to get the database name user pass it could have read the prefix but I would guess who ever wrote the script did not remember to do that.

    I hope that you made a backup before doing the update .. if so I would revert to that and perform the update within wordpress

    If you did not then you are going to have to hope that you can repair this on your own by editing the database tables ..

    You will need to do a backup

    Open a new window and
    MAKE SURE YOU ARE LOGGED IN and are on the Update Page
    do not refresh this page.. and hopefully it wont log you out

    find the duplicate tables that were made ..

    you will want to cross your fingers and delete these new duplicate tables

    Then rename your old tables your_table to wp_table

    if you are not logged out press the REINSTALL WORDPRESS Button inside wordpress

    When you do so wordpress may choke ..
    It will most likely ask you to perform a database update

    you may or may not be able to do this

    but its what I would attempt at first

  5. AKCarlow
    Member
    Posted 11 months ago #

    Setting the table_prefix to xxx_ would have worked - except I was using the twentyten theme, and for some reason the upgrade wiped the twentyten folder. Reloading twentyten has me running again with the xxx_ prefix tables.

    Thanks for the suggestions.

Reply

You must log in to post.

About this Topic

Tags

No tags yet.