Missing options after changing Database prefix

After changing the database prefix on my site as recommended by Defender the entire site crashed. Contacted hosting and they were able to put the site back on but, several options appear to be missing there even for site admin.

There are options like adding new user, installing new plugins and deleting exiting one. Also, the user role seems to be messed up on the site. Role is either admin or none.

Hosting reinstalled WordPress core files but checking the database, there are some tables with the old prefix. And a couple of them appear duplicated.

  • Adam Czajczyk
    • Support Gorilla

    Hello drsteve

    I hope you’re well today and thank you for your question!

    I have checked the site and applied some “fixes” to the database and it seems it should be working now. I’m not sure if I am not missing anything there so please double-check (just make sure that before you log in, you clear the browser cache, just in case) and let me know.

    The main issue here was that there some important meta_key were not renamed to use the new prefix (thus they were not applied) and the option record from _options table that holds the user role capabilities was not only duplicated but also altered.

    While in some rare cases the “meta_key” issue happens I’ve never seen the second issue (the _options table altered that much). I checked but I can’t see a way Defender could do this, I’m afraid. To be perfectly honest, I don’t think your hosts’ attempt to “fix” that did any good to the site but fortunately, the data was not lost from the database so I think it should be working now.

    I would, however, strongly recommend following things:

    – making sure that there’s always a relatively current backup – at least of the database – kept around

    – in case anything goes down after applying any feature/tool/action from our plugin, first getting to us instead of asking host for help (and turning to host only if we suggest that); I know how that sounds but in many cases we could fix an issue – if it’s related to our plugins – much faster and safer than the host who often doesn’t actually know what could happen (and rarely got any WordPress specialists on board).

    Hopefully though, it will be working fine now so please double-check the site and let me know if it’s okay.

    Best regards,


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.