Get the Best WordPress Backup
& Migration Plugin Today
Get Duplicator Now

Duplicator Documentation

Documentation, Reference Materials, and Tutorials for Duplicator

How to manage server resources (cpu/memory/disk)?

Issue APHP Memory
How to fix PHP “Allowed Memory Exhausted” error message?

Increase Memory

Some hosting providers limit PHPs ability to use additional memory or cap the limit very small. This issue tends to be more common onlow-end budget hosts. The options below can help you increase PHP memory.

Common Error Messages

– Fatal error: Out of memory (allocated 301989888) (tried to allocate 921600 bytes) in /somepath/ on line 100

Option 1 1. If the memory error occurs when creating a package then edit your wp-config.php file and add this:
define('WP_MEMORY_LIMIT', '500M');2. Edit your .htaccess file in your WordPress root
<IfModule mod_php5.c>
php_value memory_limit 500M
</IfModule>
3.Edit the php.ini and set:memory_limit = 500MB

 

For Bitnami users follow these steps:

  1. Open the httpd-app.conf file in the apps/wordpress/conf folder
  2. Change the value of “php value memory_limit’
  3. Restart Apache web server by going to the Bitnami App > Manage Servers tab.

Option 3Contact your host with the memory error and have them increase PHP memory for you.

Validating Memory
After updating any of the options above be sure to make check that the setting are updated. You can do this by going to: Duplicator/Pro >Tools > General > Server Settings > PHP Section > “Memory Limit” and make surethe value matches the value in one of the above options.On some system the web server will have to be restarted.

Its recommend to set the value 50% above the memory setting before any updates were made. For example if your memory setting was at 250MB before the memory errorthen the new settings would be 375-400MB. If that doesn’t work try 100% of the allocated warning which would be 500MB.

Package Builds

When building a package try to use the following settings if available on your host:

  • Duplicator: Settings > Packages > SQL Script > Mysqldump
  • Duplicator Pro:
    • Settings > Packages-Basic > SQL Script > Mysqldump
    • Settings > Packages-Basic > Archive Engine > Enable “DupArchive” or “ShellZip”
      These engine options consume much less memory than ZipArchive
    • Settings > Packages-Basic > Server Throttle >
      This prevent resource complaints on budget hosts. The higher the value the slower the backup
Running Installer

If running into memory issues on the installer, Pro users you can also use the ‘Manual SQL Execution’option by followingthese steps:

  1. Have your host or server administrator run the database.sql file for you. In some cases you may be able to use phpmyAdmin if the memoryoptions to run it are different than how your web server is setup.
  2. After the database has been installed go to step 1 of the installer and choose ‘Manual SQL Execution’ from the Action drop-down.
  3. Continue to finish out the installer as you normally would.

Also see:
What can I try for timeout issues?
What can I do for issues with migrating a large site?
Recommended hosting providers for Duplicator?


Issue BDisk Quota
How to resolve and discover disk quota issues?

When creating or installing a package a notice about disk space issues is logged.

Common Error Messages

– MSG:ZipArchive::close(): Write error: No space left on device

Overview
If you’re not sure about your Disk Quota contact your host. Some hosts will advertise that you get “unlimited space”, however the truth is a quota isplaced on every accountaccording the the Terms and Conditions of the account. Many hosting control panels or cPanel accounts give you an unlimited number of domains you can setup.With each domain they create a new directory and hosting control panels or cPanel silo for that domain which usually has a quota on how much space you can allocate to that directorysee the link above.

Most web hosts control panels will have a progress bar on the main dashboard that shows how much space you have for the specified domain. If you’re not using a cPanel setupask your host where you can find out your disk quota. So in short try to get a real answer from your host and if they still give you a canned response then try to uploada file which should be 5 times the size of your ‘Pre-Scanned’ site size. So if the pre-scan shows 50MB then try to upload a file that 250MB add see if it allows the file to upload.If it does not then you definitely have a disk quota issue.

How to locate space allocation
Check your disk quota on some of these popular systems
[GoDaddy][BlueHost][cPanel Systems]

SolutionHow to free up-space

  • Remove unused files and folders
  • Cleanup older backup files from plugins or system processes
  • Cleanup your databases with phpmyadmin
  • Cleanup your databases with a plugin

Issue CThrottle Server
How to throttle server resources on budget hosts?

If you are running into build issues or notices about hight resources here are some tips you can consider.

Adjust SettingsPro

  1. Go to: Duplicator Pro > Settings > Packages
  2. Check “Client-side Kickoff”
  3. Set Server throttling to “low” or “medium”

Adjust Backups

  • Create file filters to keep your overall package size smaller
  • For scheduled backups consider only backing up the database daily and the full site on a weekly basis.

 

If you have control over the hosting package and you’re using the lowest/cheapest package consider upgrading to a moreperformant level or switching to a better host overall. While its rare and very few hosts will mention resource issues, some lower end ones will keep track andnotify users of issues.

 

Also see:
What can I do for issues with migrating a large site?
Recommended hosting providers for Duplicator?

Was this article helpful?

Related Articles