• Resolved femacourses

    (@femacourses)


    Hello, in my title while trying to fix an error in wordpress I accidently deleted the entire table. I can’t currently find a back up, so I downloaded a new wordpress table from a new installation and ported it over. Now it says “sorry you can’t access this page and I really need help”

Viewing 11 replies - 46 through 56 (of 56 total)
  • Thread Starter femacourses

    (@femacourses)

    tried logging into wp-admin again and it keeps saying

    “Sorry, you are not allowed to access this page”

    Thread Starter femacourses

    (@femacourses)

    From now on I’ll be writing in terms of experiments to try and help the expedition of debugging this problem.

    I noticed that when I go to wp-content, themes, and then rename the folder twentynineteen, to twentynineteen.deactivate. Then I won’t get anything but blank pages when I log in using wp-login.php. So when that theme is active, I’m able to bring up a page that says “my blog” but I am not able to access the dashboard or any other settings.

    Usring femacourses.com/wp admin during this time still says “sorry, you are not allowed to access this page.”

    Thread Starter femacourses

    (@femacourses)

    New Experiment

    I tried going into the wordpress config file, and chaing the database prefix to something else. I saved, then refreshed the page, causing wp-admin to bring up an install wordpress prompt. Then I went back into that config file, and changed it back to the previous prefix, and saved it. Then I refreshed the page and it returned to a you cannot access this site.

    JNashHawkins

    (@jnashhawkins)

    I always keep a yellow legal pad handy when I’m experimenting. Those notes can be priceless sometimes.

    Are you sure you or your host might have a good backup you could just restore and be done with this whole problem?

    I’m worried that all these ‘experiments’ might be pushing you further from the goal of getting your site backup and running.

    Thread Starter femacourses

    (@femacourses)

    Unfortunately my host says they don’t keep backups, I’m trying to find my backup of when I first installed the site in my email but I don’t see it. I’ve emailed google to restore all emails in the time period. Until then I have to actually fix the problem. I”m thinking just creating a fresh install of wordpress and manually importing everything other than the wp_options table? But I’ll wait until the person who was helping me replies.

    Thread Starter femacourses

    (@femacourses)

    I still need help, does anyone have any ideas?

    Thread Starter femacourses

    (@femacourses)

    HUGE UPDATE

    One of my experiments bore some fruit. So I went into wp-config file and then I changed the database prefix from wpko_ to wp_ like I did before, and used the install to see what would happen. Now I can enter the new site using an admin I created, and all my plugins are there.

    BUT

    I don’t have any of my plugin data. So should I import everything from wpko to wp? Or should I just rename all the prefixes?

    Okay, you now have a working WordPress with the remnants of your old site of the file side anyway.

    In your database, you should probably find two database table sets, one under wp and the second under wpko.

    If you export the data from wpko you can manually overwrite the data in your WP database but… you’ll wind up back where you started from if you overwrite the whole database. You need to excise just the tables such as posts and such. This ain’t easy.

    My advice for you would be to backup or export the new table set (wp) to something on a disk or thumbdrive just in case you break things. You’ll want that sitting off to the side where you can’t break it but can see it as an insurance policy of sorts.

    Now sit down and think and read up all you can about SQL. Stare at the old table via phpMyAdmin and think… lots of coffee. Some sugar even can help.

    You can export parts of the tables from the old tableset. I’d look at posts first. That will give you a feeling of satisfaction and confidence when you move that over.

    Stay out of the users table and that corrupted options table.

    You can also go ahead and set your theme and activate your plugins. Your plugins will mostly set themselves and natter at you if they need attention. Let them be for now.

    Go slowly and look at things like the meta tables but stay away from the users and options tables. Those will bite you. They are most likely corrupt. Don’t get bit.

    I have years of experience with this stuff and it’s not easy. Take your time. Think a bunch. Ask more questions as needed. Google things. Breathe. Take breaks. This doesn’t need to be done today… or tomorrow.

    I have done some of this in different ways before. It takes time, thought and patience.

    I have one I started weeks ago and it still isn’t done. But it does work. I’m very patient and willing to take my time. You be the same way. Breathe! Think! find that first success and move forward from there.

    Thread Starter femacourses

    (@femacourses)

    I renamed all tables that had any rows to wp_ and now it seems everything is working, all I have to do now is configure settings for everything, which will take a while…..

    Thread Starter femacourses

    (@femacourses)

    Alright, so just to summarize the solution I found for anyone having this same issue of deleting wp_options and not having a back up.

    I went into wp-config.php. and changed the table prefix. I was using the prefix wpko_ before, and changed it to wp_ Then I fresh installed wordpress which created a new user. So now I had a site that I could access with my plugins, but no data for the plugins to work. I had to go back into phpymyadmin, and backed up the current version.

    I DROPPED ALL TABLES FOR THE NEW WORDPRESS SITE **** EXCEPT**** FOR

    wp_options
    wp_users
    wp_usermeta

    Then I renamed all the tables for the old tables that used the wpko_prefix to the new prefix. *****EXCEPT***** FOR

    wpko_options
    wpko_users
    wpko_usermeta

    After that was all said and done, I had all my content. Then I had to go to each individual plugin settings and setup all again like I was setting up a new site.

    remember if you reinstall wordpress keep the wp_options, wp_users, and wp_usermeta tables, and drop the old ones.

    • This reply was modified 6 years, 12 months ago by femacourses.
    • This reply was modified 6 years, 12 months ago by femacourses.
    Thread Starter femacourses

    (@femacourses)

    Thank you to everyone who helped, and gave me advice.

Viewing 11 replies - 46 through 56 (of 56 total)

The topic ‘Deleted wp_options table accidently.’ is closed to new replies.