If the error persists, the database may be corrupted. The worst thing that can happen in a WordPress database is missing tables, which happens when new plugins add or remove hundreds of tables.

This can result in the message “Error establishing database connection” on the front end, while “One or more database tables are unavailable” on the back end.

It is important to note that WordPress has a recovery mode that can be enabled. Just add to the end of the wp-config.php file:

define(‘WP_ALLOW_REPAIR’, true);

Later, navigate to the following location on your WordPress site:

https://yourdomain.com/wp-admin/maint/repair.php

Base repair

After that, you will have the opportunity to restore and optimize the database. Since you are troubleshooting your site, we recommend that you use the restore database option as it is faster.

Be sure to remove the line of code added to the wp-config.php file after performing a database restore.

You can also restore your database using cPanel.

Restore database with phpMyAdmin

Recovery

To start a database restore from phpMyAdmin, follow these steps:

Just login to phpMyAdmin,

Click your base and select all tables.

Then, in the drop-down list, click “Restore Table”. Basically, it’s just running the REPAIR TABLE command.

Fixing corrupted files

The second likely cause of this error is that the files may be corrupted. This can happen when exchanging files via FTP, which is not that secure and therefore a hacker can easily access the files. This issue needs to be fixed as soon as possible. Be sure to create a backup before cleaning corrupted files.

To do this, follow these steps:

Make a manual backup of the database.

Now download the latest version of WordPress and replace the old version with the latest one.

Unzip the created backup and delete corrupted files. You need to delete the wp-content folder as well as the wp-config-sample.php file.

Now upload the rest of the files to the updated version of WordPress via a secure exchange application i.e. SFTP.

Clear your browser cache. Now check again if the error occurs.

Troubleshooting a server problem

We tried to fix all possible causes of this error. But if nothing worked, that means you need to check with your hosting provider because it could be due to a problem with the database server.

As we discussed earlier, if this is the case where multiple concurrent connections are using your database at the same time, then this can slow down or even lose the connection to the database.

To minimize interaction with the WordPress database, you can use caching plugins such as W3 Total Cache, WP Super Cache, Quick Cache and others.

And, if we are talking about shared hosts sharing the same resources on servers, then you can solve this problem with high performance, best managed WordPress hosting. This will make it easy to handle large volumes of traffic to your WordPress sites.

How to prevent it in the future

To avoid database connection errors on a WordPress website, follow a few steps:

Quality and secure WordPress web hosting. Only work with hosts that have optimized their platforms to work with WordPress.

Be sure to create regular backups every time you update your site. You can also install a simple backup plugin like UpdraftPlus which works automatically.

Update plugins and themes.

Remove WordPress plugins or themes that are no longer in use and periodically check your WordPress themes and plugins for malware.

Always update your WordPress to the latest versions.

How to Make Google Like Your Site – Simple SEO Rules

How to Make Google Like Your Site – Simple SEO Rules

November 3rd, 2014 | Inspiration, Lessons

seo, wordpress, wordpress optimization 4

How can you describe the relationship of websites with Google? If you imagine this search engine as a girl, then you get something like: Everyone wants it, but no one can get it. When you think you’ve shot straight at the target, it changes course and you’re back with nothing.

How to Make Google Like Your Site – Simple SEO Rules

Dedicated hosting for WordPress sites!

Why such an analogy? Isn’t that how you feel when you go out of your way to get your content liked by Google? And this is the reality of the digital realm where we are most failing.

See also:

WordPress SEO by Yoast – Setup Guide

Yoast WordPress SEO vs All in One SEO Pack: Which Should You Choose?

Great review of the best SEO plugins for WordPress

How to Get the Most Out of Google AdSense in WordPress

How to make your WordPress site more attractive to users

By creating a website, we have hopes that our online project will become successful. But if you want Google to love your blog, you have to play by its rules. One of them is filling the site with high-quality and unique content. But even this is not enough.

If you find out what this capricious woman needs, then she will turn her attention to you. And how, nevertheless, to tame her? Everything is really simple.

Enough to speak her language.

Choose a WordPress theme and try it on your site

Imagine that the theme you have chosen is a suit. Would you buy it if it was frayed and buttonless, or would you go for one that fits you well and looks great? Most likely the second option, right? The exact same analogy can be drawn with choosing a WordPress theme for your blog. You need to choose a theme with high-quality and simple code.

How to Make Google Like Your Site – Simple SEO Rules

Here are some examples of resources where you can get a great “suit” for your site:

ThemeFurnace

StudioPress

Elegant Themes

Returning to the choice of topic, answer the question: “Which is better? Buy a suit and start wearing it right away, or just tweak it a little to fit your figure?

Well, James Bond never wore freshly bought suits, and technically speaking, you wouldn’t either. Based on the analogy we made with Google and with female nature, there is hardly a woman who refuses to communicate with a man in a perfectly fitting suit.

Want to grab the attention of the Google lady? Then make your blog attractive to her.

Replace tagline (short description)

There are many opinions about what a tagline should be. But the fact remains that the presence of at least some tagline is much better than its absence. With it, you can get Google to pay attention to your blog, and it should contain information about the subject of your site.