How to fix WordPress Importer Errors

Some time ago our websites team were transferring a client’s website from one host to another, they were also changing their domain from one ccTLD to a top-level domain. One problem persisted and they had to try and solve it.

The import tool is used to import all data from another WordPress installation to another. It is one of the simplest manual ways to import a website without having to rebuild databases and all that complicated stuff using the importer plugin or the WP All Import

Well sometimes the WordPress Importer and similar plugins that are used to import XML files, CSV files, WXR files, and images fail to do so effectively, this is often due to a mix of several reasons, that give you errors such as the site just returns a 500 error, here are other WordPress error solutions.

WordPress Importer trouble could be as a result of timeouts, website performance issues to occur while these imports are being processed. It is common t have reduced or slowed down website performance due to sudden large import is running being handled by both PHP and MySQL which are the engines handling the import process.

How to fix Broken Themes: Incomplete, Stylesheet is missing WordPress errors

Let’s discuss the two types of time outs, they are

  • 502 server error: here, PHP timeouts that result if a single PHP process runs for longer than the max_execution_time or max_input_time set in the PHP configuration.
  • 504 gateway timeout error: here, HTTP timeouts are caused by the connection between your browser and the web server being held open for way too long.

Solving Time Outs

Should you into a PHP timeout the max_execution_time and max_input_time, you will need to increase them to the maximum PHP timeout. These values vary from host to host based on your current hosting plan. We will discuss this further in another detailed post.

How to Solve WordPress Fatal Error: max_execution_time Exceeded Error

Some WordPress Importer problems could be due to plugin conflict, and they way to know this is through enabling the WP_DEBUG = true in wp-config.php after import? That way you will be able to see the error when you go to the home page of WordPress.

The easiest way is to go to the old WordPress website. In the WP-Admin area, find the Tools > Export menu item. Hit the blue “Download Export File” button and save the XML file generated.

Ensure that you do not export all the data in there at once, best to do it in bits, this means, you export pages first, then posts, them WooCommerce if you have it, then events, e.t.c, the best idea to solve this WordPress Importer issue is to make sure that you export each with its attachments, meaning any media, tables etcetera.

Divide file into small chunks

Another longer way to solve the WordPress Importer issue is to export all data then divide it into smaller bits. To do this method,  using your favorite basic text editor like Notepad, and PLEASE DO NOT USE MS WORD or any other “word processing” application.

The first lines are all mostly instructions. They’re not important. But watch out for the the <?xml version="1.0" encoding="UTF-8" ?> tag on the top line is very important. Wherever you see the <rss version="2.0"... and the <channel> tags, that’s where the content starts.

Now, here comes the hard part.

Ensure your bits are properly formatted

Every bit must start and end with the proper tags. They should strictly follow this pattern:

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <rss version="2.0"...
  3. <channel>
  4. <wp:wxr_version>1.2</wp:wxr_version>
  5. Your 5,000+ lines of content, starting with <item> and ending with </item>
  6. </channel>
  7. </rss>

Upload these bits you just split up individually

Using the Tools > Import > WordPress Import process, import these smaller files that won’t take forever to parse. Your data should import just fine, albeit in smaller installments.

This method might end up breaking your data’s relationships.

it is thus best to export them in bits, as I said above, pages, then posts, then tables, etc.

Wonderful!, just before you go, If you like these WordPress fixes, there is more: Please subscribe to our website for the latest tips, ideas, and recommendations to make your WordPress Websites wonderful.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 151 other subscribers

%d bloggers like this: