Skip to main content

How to Fix a Corrupted WordPress Database

[ad_1]

WordPress is controlled by its database. You cannot display a post properly if your database is corrupt, as sometimes the categories and tags are all wrong, or sometimes you cannot even log in.

However, corrupted databases for WordPress happens more than you would have liked. And it could be because of a variety of reasons, such as installing a faulty plug-in, your WordPress being hacked, a server crash, hardware failure on your server, or a bug in MySQL, or for no particular reason it seems.

Before you panic, though, take a deep breath and know that there are simple ways to fix a corrupted database.

So what do you do when the dreaded error message, "... is marked as crashed and should be repaired" crops up?

Fix corrupted WordPress databases via SSH or PhpMyAdmin, or cPanel

a. PhpMyAdmin - find the suspected WP database and check the table that has been corrupted.

Then look for the drop-down box and select "Repair table" from the options.

b. Secure Shell

• Log into your shell, then access the databases by keying this in mysql -u username -p database_name.

• View all the databases by typing in show databases.

• Then type in use database_name; to access the database.

• Type in show tables to view all the tables. Look for the corrupted table from the list.

• Type in check table wordpress_table_name to ensure that this is the table that is giving you the error.

• Now it's time to repair the corrupted table. You can do this by keying in repair table wordpress_table_name.

c. In cPanel:

• Log into cPanel and find your MySQL Databases.

• Select the database from the dropdown list under MySQL Databases.

• Click the Repair DB button.

If the SSH option seemed rather long for you, try this shortcut:

• type in mysqlcheck database_name to see which tables has crashed.

• then type in mysqlcheck database_name --auto-repair to repair the corrupted files.

You could also set up WordPress to automatically repair corrupted databases by adding this line:

define('WP_ALLOW_REPAIR', TRUE);

into your wp-config.php. This works only for WordPress version 2.9 or later.

Two things that you should always do with regards to WordPress databases: Backup and Optimize.

Optimizing your database is very much like defragging your hard drive. It is a way to clean up your database so that it runs smoothly. Optimizing helps clean up your database and frees up server disk space.

Check out the following plug-ins to help you optimize your database:

• WP-Optimize: This plug-in allows you to optimize and clean up your database and perform other tasks easily and with just a few clicks.

• Clean Options: If you have orphaned options in your database, this plug-in could help you easily clean them up.

• WP Database Optimize: This allows you to set up a schedule for your optimization.

Backing up your database should help you get back on your feet if more database problems arise and these suggestions do not work. Instead of losing your blogs, articles and readers, you can just restore a previous backup of your WP installation.

And that's how you fix a corrupted WordPress database.


[ad_2]

Source by Sherly A. Mendoza

Comments

Popular posts from this blog

SEO Meanings

[ad_1] Like with most things, computer speak has a language all its own. When you create a website you most likely will encounter a lot of new lingo, and while some of it actually makes a lot of sense there are some terms that may be a bit weird, even for the techy among us. When you think of a white hat you may think of the Kentucky Derby or a Royal Wedding but in SEO speak it means the group of techniques that use the best practice, the ones that earn you all the gold stars and brownie points, the ones that don't use bad manipulations to gain traction or ranking, but those who do what they do to the best of their abilities, create wonderful content and follow all the rules. Things like time on page is pretty self explanatory. There are actually people out there who analyze data like how long people spend on a certain site. They are timed and when they click out that data is collected. You optimally want people to spend some time on your site, not just click in and out in three se...

SEO - Where Do I Start?

[ad_1] Search engine optimisation (SEO) - The process of impacting the ranking of a website on a search engine's results for specific keywords to gain organic visibility Every search engine combined receives over 6.5 billion searches a day with Google contributing around 4.5 billion of the searches. The benefits of a good SEO are huge, from your sites ranking within keyword searches to increasing the possibility of conversion. As a consequence, developing a good SEO involves many obstacles, the largest being how a search engines rank websites is unknown to everyone. For example, Google uses an algorithm involving over 200 factors to determine the ranking of websites for a specific search yet Google will never release information on any of the factors. But through persistent testing, web designers have been able to identify some factors to include into your website and research. Market knowledge You must know your target market, including understanding the keywords potential visitor...

SEO Articles After Google Panda Updates

[ad_1] As an obedient online marketing student, you've been creating content for your websites, trying to please the teacher, ie, Google. However after the recent updates, it seems that pleasing the teacher got a little tougher! Google Panda Update & SEO Articles In Feb 2011, Google came up with the Google Panda update with the intention to improve the search result quality. As a result many sites with a lot of ads and low quality content started to fade off. They were replaced with quality content based sites, social networking sites, news sites etc. In this way Google gave an indication that SEO content writing techniques used previously which included keyword stuffing, spinning etc were out of the window. If you wanted to achieve good SERPs, you have to create SEO articles that are meaningful and need not be too "sales-y". So, what do you do to create effective articles that will please the search engines? Content Based on Keyword Group To begin with forget about s...