Troubleshooting

Why is my backup getting stuck on the wp_posts database table?

In a WordPress installation, all of your page and post information is stored in the wp_posts database table.  As your site grows, the database can take up a lot of space.

If you don’t have access to enough memory, you may experience problems with backups.

  • Optimise your database to reduce the size of the wp_posts table so that less memory is required.
  • Increase the amount of available memory (if needed).

You can achieve this via a WordPress optimization plugin such as WP-Optimize.

Although it’s safe to use, make sure you take a manual backup of your database first.

 1. Install and activate the plugin

  • Go to Plugins >> Add New Plugin and search for WP-Optimize.
  • Click Install Now.
  • Click Activate.
Find WP-Optimize in the plugin directory window by searching it in the search bar

 2. Run the database optimisation

  • Go to WP-Optimize >> Settings >> Database.
  • Click the Run all selected optimizations button.
'Run all selected database optimizations' here in the WP-Optimize plugin window

 3. Test

  • Go to UpdraftPlus >> Backup / Restore.
  • Click the Backup Now button.
Backup now button in the UpdraftPlus plugin window

Increase your WordPress memory limit

Section titled Increase your WordPress memory limit

Is your backup still getting stuck on the wp_posts table?  We recommend that you increase the amount of memory that WordPress can use

1. Check PHP memory limit

  • Go to Tools >> Site Health >> Info >> Server.
  • Note the value for PHP memory limit.
In the 'Site Health' section of the side toolbar, go to 'Server' section to check server details and memory limit

 2. Check WordPress memory limit

  • Go to Tools >> Site Health >> Info >> WordPress Constants.
  • Note the values for WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT.
In the 'Site Health' section of the side toolbar, go to 'Server' section to check server details and memory limit

 3. Install Advanced File Manager plugin

  • Go to Plugins >> Add New Plugin.
  • Search for Advanced File Manager.
  • Click Install Now, followed by Activate.

4. Open the config file

  • Go to File Manager >> File Manager >> Database.
  • Right-click on wp-config.php.
  • Select the Edit Code menu item.
Open the wp config file from your computer on the 'Advanced File Manager' page

5. Check it isn’t already set

  • Check that the text WP_MEMORY_LIMIT doesn’t already exist in the file.
  • If it does you will need to edit that value rather than adding it again.

6. Add the new value or edit the existing one

Find the line in your wp-config.php file that says:

/* That's all, stop editing! Happy publishing. */

Just above this line, add the following code and replace 256M with your desired memory limit.

define('WP_MEMORY_LIMIT', '256M');

Note: Don’t exceed your server’s PHP memory limit or the previously mentioned  WP_MAX_MEMORY_LIMIT.

Finally, save your changes to the wp-config.php file.

Add a new value or edit the existing one in the code editor

 7. Test

Go to UpdraftPlus >> Backup / Restore.
Click the Backup Now button.

I still can’t increase my memory limit

If you’re still having problems with your memory limit, we recommend contacting your hosting provider who will be able to advise you further.

Our plugins

Try TeamUpdraft’s full suite of WordPress plugins.

  • UpdraftPlus

    Back up, restore and migrate your WordPress website with UpdraftPlus

  • WP-Optimize

    Speed up and optimize your WordPress website. Cache your site, clean the database and compress images

  • UpdraftCentral

    Centrally manage all your WordPress websites’ plugins, updates, backups, users, pages and posts from one location