Skip to content

Troubleshooting

Solutions for common server constraints, hosting timeouts, and restore recovery procedures.

Scheduled backup never finishes on LiteSpeed hosting

Section titled “Scheduled backup never finishes on LiteSpeed hosting”

On hosting environments powered by LiteSpeed Web Server (or OpenLiteSpeed), long-running PHP requests triggered via wp-cron.php are terminated prematurely as soon as the initial HTTP connection drops.

  • Scheduled backups show as stalled or never complete.
  • Failure notification email reports that the scheduler timed out.

Add the following directive to your root .htaccess file:

<IfModule Litespeed>
RewriteEngine On
RewriteRule .* - [E=noabort:1]
</IfModule>

Alternatively, add noabort specifically for wp-cron.php:

<IfModule Litespeed>
RewriteRule wp-cron\.php$ - [E=noabort:1]
</IfModule>

This tells LiteSpeed to allow PHP scripts triggered by WordPress cron to execute until completion without abrupt connection drops.

Large database dumps or sites with tens of thousands of media files can exceed default PHP shared-hosting limits.

  • Backup progress stops at a specific percentage.
  • Browser console displays a 500 Internal Server Error or 504 Gateway Timeout.

In your wp-config.php, increase the memory allocated to admin tasks:

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

If your host permits .user.ini or php.ini overrides:

max_execution_time = 300
memory_limit = 512M

For massive sites exceeding browser HTTP limits, execute the backup or restore through WP-CLI, which runs directly in the terminal without web server timeout caps:

Terminal window
wp migrator export

Restoring on servers with DISALLOW_FILE_MODS

Section titled “Restoring on servers with DISALLOW_FILE_MODS”

If your hosting provider or security configuration sets:

define( 'DISALLOW_FILE_MODS', true );

WordPress core disables file modifications from the browser. In this state, Migrator’s web interface restricts restoration to the database and uploads folder only, skipping plugins and themes to respect server policy.

To perform a complete file and code restore under DISALLOW_FILE_MODS, use the WP-CLI command:

Terminal window
wp migrator import /path/to/backup.tar.gz --only=plugins,themes

WP-CLI executes as the system user and bypasses browser-level file modification restrictions.

Recovering from an interrupted database restore

Section titled “Recovering from an interrupted database restore”

Before Migrator writes any imported tables into the active database, it takes an automatic snapshot of the existing database.

  1. If the database import fails or URL rewriting encounters an unrecoverable SQL error, Migrator automatically restores the pre-restore snapshot and leaves the site untouched.
  2. If the database import succeeded but extracting file archives failed afterwards (e.g. running out of disk space), the database retains the imported data. The failure notice provides the exact file path of the database snapshot stored in wp-content/migrator-backups/.
  3. To manually roll back to that snapshot, run:
Terminal window
wp migrator import /path/to/wp-content/migrator-backups/snapshot-before-restore.sql --only=database

Insufficient disk space in wp-content/migrator-backups

Section titled “Insufficient disk space in wp-content/migrator-backups”

Migrator verifies available disk space before starting an export. A full backup temporarily requires free space equal to the size of the database plus wp-content.

  • Store backups on external targets (FTP, FTPS, S3, Cloudflare R2) and configure an automated retention rule (e.g. keep only 2 or 3 local copies).
  • Clean up unused zip archives, log files, or old staging directories using Migrator’s File-size explorer under Migrator > Backup > Exclusions.