BlogTroubleshootingBackups

Why WordPress backups time out on shared hosting, and how to make them finish

A backup that stops at 40% is usually a time or memory limit, not a broken plugin. What those limits are, how to tell which one you hit, and how to get a backup that finishes.

3 min readPerforks

A backup cut into short slices, each one well under the 30-second PHP time limit

You press Back up, the bar climbs to 40%, and then nothing. Or an error 500. Or a zip that will not open. On shared hosting this is so common that many site owners decide backups simply do not work for them. They do; they just have to be written for the limits a shared host puts on every request.

The three limits behind most failed backups

LimitWhat it doesTypical sign
max_execution_timeStops a PHP request after a number of seconds, often 30 to 60 on shared plans.The backup stops at a different point each time, usually on a big file.
memory_limitCaps how much memory one request may use, often 128 or 256 MB.“Allowed memory size exhausted” in the error log, often while zipping a large file.
Web server or proxy timeoutThe front server gives up waiting for PHP, often after 60 to 120 seconds, even if PHP could go on.An error 502, 503 or 504 page instead of a PHP error.

A plugin that builds the whole archive in one request will hit one of these on any site with a few gigabytes of media. Raising the limits helps on some hosts, but on many shared plans you simply cannot change them.

Find out which one you hit

  • Look at the PHP error log in your hosting panel at the time the backup stopped. “Maximum execution time exceeded” and “Allowed memory size exhausted” name the limit for you.
  • WordPress's own Tools → Site Health → Info → Server shows the PHP time limit and memory limit the site runs with.
  • A 502/504 page with no PHP error usually means the web server's timeout, which only the host can change.

How to get a backup that finishes

Work in short steps

The reliable fix is not a bigger limit but smaller requests. A backup that writes the archive in short slices, saves where it got to, and continues in the next request never runs into the time limit at all. If a request is cut off, it picks up where it stopped instead of starting again. This is how Restora works: each step stays well inside the limits of the tightest shared host, even in the middle of a large file.

Back up the parts separately

The database is usually small and changes daily; the media folder is large and changes rarely. Backing up the database every day and the full site every few days gives you smaller archives and a recent database without moving gigabytes every night.

Do not back up what you can rebuild

Cache folders, old backup archives inside wp-content and log files only make a backup bigger and slower. Leave them out.

Make scheduled backups start on time

WordPress starts scheduled tasks when someone visits the site. On a quiet site a 03:00 backup may start at 09:00 with the first visitor, in the middle of the working day. A real server cron job that calls wp-cron.php every 15 minutes makes the timing exact:

*/15 * * * * curl -s https://example.com/wp-cron.php > /dev/null

A finished backup is only half the job

A backup is only as good as its restore, and a restore runs into the same limits. Test it: restore a backup on a staging copy once in a while. Restora verifies every file in the archive before it writes anything, loads the database into temporary tables and swaps it in one step, and puts everything back as it was if a step fails, so a restore that cannot finish leaves the site as it was instead of half-restored.