Support » Fixing WordPress » Unable to access my blog

  • Resolved scgms1


    I’m unable to access my blog after deleting a spam post on it. I’m not sure what had happened, but the exact message was, “One or more database tables are unavailable. The database may need to be repaired.”

    I added “define(‘WP_ALLOW_REPAIR’, true);” to the wp-config.php file and I ended up with a “Error establishing a database connection”

    Here’s what’s in the wp-config.php file.

    define('WP_ALLOW_REPAIR', true);
    // ** MySQL settings ** //
    define('WP_CACHE', true); //Added by WP-Cache Manager
    define('DB_NAME', '[ redacted ]');     // The name of the database
    define('DB_USER', '[ redacted ]');     // Your MySQL username
    define('DB_PASSWORD', '[ redacted ]'); // ...and password
    define('DB_HOST', 'mysql');     // 99% chance you won't need to change this value
    // Change the prefix if you want to have multiple blogs in a single database.
    $table_prefix  = 'wp_';   // example: 'wp_' or 'b2' or 'mylogin_'
    // Change this to localize WordPress.  A corresponding MO file for the
    // chosen language must be installed to wp-includes/languages.
    // For example, install to wp-includes/languages and set WPLANG to 'de'
    // to enable German language support.
    define ('WPLANG', '');
    /* Stop editing */
    define('ABSPATH', dirname(__FILE__).'/');

    What do I need to do at this point?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Jan Dembowski


    Brute Squad and Volunteer Moderator

    First make a backup copy of that wp-config.php file for safe keeping.

    Once that backup is made delete that one line at the top that you’ve added and re-add it after the <?php line. Where you put that line would cause a problem.

    Also consider performing a database repair via phpmyadmin.

    Once your WordPress installation is working again, you may want to speak to your host provider about changing the mysql user ID and password. For 19 minutes or so that info was on your post above and you should never post details like that.

    Hi Jan,

    Thanks for the tips! I’m sure this stuff is simple for you, but it is new to me. Switching the “define(‘WP_ALLOW_REPAIR’, true);” and putting it after the <?php tag didn’t work.

    Installing phpmyadmin did the trick after the program repaired the database.

    I also was able to change the password with phpmyadmin.

    Thanks for your help!

    Moderator Jan Dembowski


    Brute Squad and Volunteer Moderator

    Glad to help. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unable to access my blog’ is closed to new replies.