Media Files or Theme & Plugin Files Errors

There are a few potential causes of errors when running a migration that includes media files, theme files, or plugin files.

In some instances, there may be a PHP file in the uploads directory, which can cause errors when migrating media files. This often happens when an empty index.php file is used to prevent the web server from listing the contents of the directory (also known as directory listing).
If this happens with media files, or if you have problems with theme and plugin files, try the troubleshooting steps below.


The first thing to check is directory and file-system permissions. If the web server is unable to write files to the wp-content/uploads, wp-content/themes or wp-content/plugins folders the migration will not run. Check out our doc on file permissions for more.

Another potential cause of errors is symlinks. Symlinked media files or theme and plugin folders (or subfolders) will not migrate correctly as the web server is unable to locate the real path of the files being migrated.

Restricted PHP core functions

Another thing to look out for is restricted PHP core functions. Some web hosts don’t allow certain PHP functions to run out of security concerns. The functions required to run a Media Files or Theme & Plugin Files migration are:

If you get an error message mentioning any of the above functions, follow up with your web host to see if they can be allowed. They are typically listed in the disable_functions section of php.ini.

We are aware of a restriction on WP Engine that stops the creation of executable PHP files via unauthenticated requests. This means that pulling PHP files into a WP Engine site will work, pushing for the time being, will not.

Firewalls and rate-limiting

Another thing to be aware of when running a Media Files or Theme & Plugin File migration is that when pushing some hosts may rate-limit or block requests from the plugin. This is likely due to a firewall or DOS prevention software. Sending multiple network requests in rapid succession can appear malicious to some firewall software.

If you notice that migrations are failing because either the file size or number of files transferred is not correct, follow up with your host to see if your local server’s IP can be added to an allow list within their security measures.

ModSecurity is a popular web application firewall that can also interfere with the migration. If your server has ModSecurity installed, see our doc on ModSecurity for some possible ways around this.

Memory limit

You may notice that running file transfers cause memory exhaustion errors. When running a push we load each file’s contents into memory, so this may be where an error occurs. Please see our detailed doc on memory limits for some options to increase memory usage.