Wordpress export failing

I’m in the process of testing Ghost (locally) with content migrated from a live Wordpress site.

  • All is working well for both Ghost (local) and Wordpress (local).
  • I have downloaded the rather large db ~250mb and assets ~20GB. Importing into my local Wordpress has worked (using Local App - very impressed how simple this was).
  • I’ve cleaned up a few posts, removed the old tags and changed categories into tags.

Now I’m up to the process of exporting from Wordpress to Ghost using the Ghost migration plugin for Wordpress.

Ghost Migrator 1.1.0 - Diagnostics

PHP version: 7.4.1.
PHP ZipArchive Installed: Yes
Memory Limit: 256M
Max Execution Time: 1200

The error I receive when trying to export the JSON is as follows;

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /Users/shawnsmith/Sites/trizonelocal/app/public/wp-includes/meta.php on line 1190

Any suggestions/tips?

You’ll need to edit php.ini and increase memory_limit, then restart the web server. The location of the file varies according to OS, PHP config etc.

Thanks @mjw.

Looking again at my debug information, I think 256M is the max and it’s reflected in the info above.

I also went and checked my php.ini file it also says 256M.

Increase the amount in 256M increments, and see that helps.

1 Like

Another option if @mjw’s suggestion doesn’t work is to use Ghost’s migrate CLI tool (if you’re comfortable on the command line).

It’s not too difficult to set up and use and will generate all needed assets to import into your Ghost site.

Ahh, that seemed to work for me at 512M. Thank-you.

1 Like

If the above failed for me I would have given this a try. Thanks @RyanF.

1 Like