Database Error: wp_options doesn't exist

Hey!
When attempting to access my website im faced with the following:
"Error establishing a database connection".
I checked my database and then repaired it however even after ive repaired it im faced with two error messages.

"Error : Table 'themin17_wp5.wp_easycontactforms_acl' doesn't exist
status : Operation failed"

AND

"Error : Table 'themin17_wp5.wp_options' doesn't exist
status : Operation failed"

Im guessing that its the second error message is causing the problem as the first one is referring to a plugin. Ive looked all over the net on forums etc. and I cant find a solution anywhere. I decided it would be wise to restore the site from a backup however after contacting my host they say they no longer offer backups/restores without notifying me.

So backups are out of the question and im stuck on what to do. Im a bit of a novice when it comes to Wordpress so I dont want to go do something and mess the website up even more then it currently is.

Any help on this issue would be appreciated.

Thanks! :slight_smile:

  • aristath

    Hello there @Lewis, I hope you're well today!

    It seems like your database is pretty messed-up....

    If I were you I'd completely nuke the WordPress installation and start over.
    The problem is that the options table that can't be found and it contains ALL the information about your site, except the posts that you've written.
    So if that table really doesn't exist, there's no way to get your previous site back.

    If you want, you can export these tables, depending on what you want to keep:
    Comments:
    wp_commentmeta
    wp_comments

    Posts:
    wp_postmeta
    wp_posts

    Taxonomies (categories, tags etc)
    wp_terms
    wp_term_relationships
    wp_term_taxonomy

    Users:
    wp_usermeta
    wp_users

    I would advice you to export them separately from phpmyadmin.

    Then you can delete everything from your database, visit your site's URL and you'll be prompted to setup your site.

    Once you do, you can try re-importing your tables back in your DB.
    But please keep in mind that these backups only contain the content of your site, not any customizations you may have done to it.

    Cheers,
    Ari.

  • Lewis

    Hey @aristath. Thanks for the reply. I went on a live chat support with my host and they said that setting up a new wordress installation on a temporary domain, then exporting the options database and importing to my current site and replacing the current database might work. Would that work at all?

    Also, do the databases youve mentioned include pages and media? The website doesnt have many posts however has many pages and alot of media. Would I be able to export them?

    Do you know what could of caused this error to happen in the first place? If its something ive done wrong it would be beneficial to know for future.

    Thanks again :slight_smile:

  • aristath

    Hey @aristath. Thanks for the reply. I went on a live chat support with my host and they said that setting up a new wordress installation on a temporary domain, then exporting the options database and importing to my current site and replacing the current database might work. Would that work at all?

    Not quite...
    If the options table is the only thing that is missing from your current database then you will have to set up a new "temporary" site, export the options table, then open it and replace all instances of the temporary domain with your original domain.

    BUT what if there are more things in your database that got messed-up? You'll have to repeat that process again and again with the other tables untill you get a working site.

    The suggestion I made above is basically the same thing... just a bit safer since you are sure you have a blank new site with just your content in it.

    Also, do the databases youve mentioned include pages and media? The website doesnt have many posts however has many pages and alot of media. Would I be able to export them?

    Yes, these are included in the tables I mentioned above.

    Do you know what could of caused this error to happen in the first place? If its something ive done wrong it would be beneficial to know for future.

    It could be many things... The first 3 things that come to my mind are:
    1. a "security" plugin
    2. a disk failure on your host
    3. use of insecure usernames or passwords for your admin, resulting in your site getting hacked.

    Cheers,
    Ari.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.