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.
Symptoms
Section titled “Symptoms”- 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 OnRewriteRule .* - [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.
PHP memory limit and execution timeouts
Section titled “PHP memory limit and execution timeouts”Large database dumps or sites with tens of thousands of media files can exceed default PHP shared-hosting limits.
Diagnostics
Section titled “Diagnostics”- Backup progress stops at a specific percentage.
- Browser console displays a
500 Internal Server Erroror504 Gateway Timeout.
Recommended adjustments
Section titled “Recommended adjustments”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 = 300memory_limit = 512MFor 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:
wp migrator exportRestoring 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.
Solution
Section titled “Solution”To perform a complete file and code restore under DISALLOW_FILE_MODS, use the WP-CLI command:
wp migrator import /path/to/backup.tar.gz --only=plugins,themesWP-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.
What happens if a restore fails mid-way?
Section titled “What happens if a restore fails mid-way?”- 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.
- 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/. - To manually roll back to that snapshot, run:
wp migrator import /path/to/wp-content/migrator-backups/snapshot-before-restore.sql --only=databaseInsufficient 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.
Best practices
Section titled “Best practices”- 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.