Overhead in one or more of your database tables can cause your database to perform poorly. It can also cause other issues like Fatal Errors. One of the more common fatal errors is memory allocation which can be easily fixed. I will explain a fast way to solve for this issue, but let’s start optimizing.

phpMyAdmin

Here are the steps to follow in phpMyAdmin

1. Go to your web hosting account’s cPanel and click the “phpMyAdmin” icon. If you don’t see one, look for “MySQL Databases” icon, click it, scroll to the bottom of the page, and click the “phpMyAdmin” link.

2. Select your WordPress database.

3. Look in the “Overhead” column. If you see a table with overhead, select that table by clicking on the box to the left.

database-optimizing

4. Scroll to the bottom of the page and in the drop down menu select “Optimize Table”.

database-optimizing2

5. Once the table is optimized, you shouldn’t see any number in the Overhead column. Click the Back button twice (to go back to the tables list), and repeat from step 3 to remove any other tables that have overhead.

How to Fix Fatal error: Allowed memory size

Method 1: You can assign the memory limit to any amount you like by changing the 16M to other number, such as 32M or 64M. 64M will set the memory limit to 64 megabytes.

To change the memory allocation limit permanently for all PHP scripts running on the server, modify the PHP.INI configuration file of the server. Search for memory_limit after opening the file in an editor. If the memory_limit doesn’t exist, add the following line. If it’s there, modify the value of the memory_limit: to;

memory_limit = 64M.

If you do not have access to your PHP.ini file, there’s another method you can try.

Method 2: Add the following to wp-config.php right before the ‘stop editing’ comment:

ini_set(“memory_limit”,”64M”);

I have tested this in WordPress 2.8.4 and it worked like a charm.