URGENT: Defender broke site when modified database prefix

When ran defender database prefix change, next time i visited the site it was a scratch wp install!

How can i revert this?

Please urgent help!

  • Predrag Dubajic
    • Support

    Hi Cultiva,

    I tested changing the DB prefix on my end and had no issues afterwards, I did check your site and see that you have no posts or pages besides the default ones, is this the content that got erased?

    Do you have backup of your DB ready, as mentioned in text above the changing DB prefix you should create a backup before performing the change?

    I also see that DB change in hardener is still showing that this is not performed, have you reverted to wp_ prefix again?

    Best regards,
    Predrag

  • Cultiva Tus Ideas
    • Site Builder, Child of Zeus

    As dumb as it sounds, did not backup before (thought snapshot was set up but it wasnt... stupid)

    Haven't tried to change backl to wp_, i was waiting for you to suggest that. Just dont want to make things worst.

    Should i do that? and should i include the '_' or just 'wp' ?

    Thanks!

  • Cultiva Tus Ideas
    • Site Builder, Child of Zeus

    I tried to change it back via Defender but it said the prefix already exists.

    So i went via filemanager (on cpanel) and modified the wp-config.php

    Changed
    $table_prefix = 'wp_';

    to
    $table_prefix = 'cti_';

    Now the site is back but i can not login as admin (Actually can, but cant acces the backend). I guess more things may be not working properly.

    Any thoughts?

  • Cultiva Tus Ideas
    • Site Builder, Child of Zeus

    Ok i did that, the site is back but admins cant go to the wp-admin area.

    They get a 'not enough permissions to access' message

    When i first changed the database with DEFENDER, next thing i was taken to a fresh 5 mins wp install. I did install it so i could run WPMUDEV dashboard. So that's the empty installation you visited.

    Now, that i changed the wp-config line you said, the site is back. But not everything is working properly. Maybe i should manually modify something else?

    Im waiting. Thanks!

  • Hoang Ngo
    • Code Slayer

    Cultiva Tus Ideas,

    I would like to take a look at your server. Can you please send in:

    - Mark to my attention - ATTN: Hoang Ngo
    - Link back to this thread
    - Include admin/network access
    - Include cPanel (I will need to look at the DB so need PHPMyAdmin or similar)
    - Include FTP
    - Include any relevant URLS for your site

    On the contact form, select "I have a different question", this ensures it comes through and gets assigned to me.

    Thanks!!.

    Best regards,
    Hoang

  • Cultiva Tus Ideas
    • Site Builder, Child of Zeus

    Great Hoang, the site is back again working normally.

    Thanks for the hard work (at least for me it was hard!).

    Just one question: what are the current state of my db prefixes? Did you get to change them as recommended by DEFENDER or not?

    Also i would like to know why did this happen, was it because of DEFENDER? or is there something else i should fix before trying to use DEFENDER again?

    Thanks again!

  • Hoang Ngo
    • Code Slayer

    Hey,

    No worry, it just a click, click and smashing to my keyboard :smiley:

    Just one question: what are the current state of my db prefixes? Did you get to change them as recommended by DEFENDER or not?

    It changed to your prefix, not the default wp_ anymore.

    Also i would like to know why did this happen, was it because of DEFENDER? or is there something else i should fix before trying to use DEFENDER again?

    Perhaps when processing, the memory run out, and it blocked the whole script function. I'm investigate it on my end.

    If you have any additional issues, please let us know and we'll be happy to help.

    Best regards,
    Hoang

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.