HomeWordPressWordPress – How to Export All content from WordPress site?
WordPress – How to Export All content from WordPress site?
October 6, 2018
WordPress provides a feature to allow us to Export the content of WordPress site into an XML file. This is an important feature when you move your WordPress site to the different hosting provider or when you want to take the backup of your site content.
We will go through the below steps; explains how to export the WordPress site content.
Step 1. Login into your WordPress site as a site Administrator. This important, because ONLY for the administrators all the options or features are enabled.
Step 2. Once you log-in, WordPress displays a Dashboard’s Home page, from where you can quickly access other areas in your WordPress site. Like the Dashboard tab, you will see other tabs also once you login into your WordPress site.
Select the Tools tab and then select the Export option. WordPress will display Tools’s Export page; which allows you to export WordPress site content into an XML file.
Choose what to export
Tool’s Export page provides options to export all the content of the website or only partial site content. This page displays below options:
We will look into “All content” option through the below steps.
Export All content
Step 3. To export all the content of the site, select “All content” option. This will export all of your site’s posts, tags, comments, categories, links, link categories, pages, tags, custom fields etc,
The size of the XML file will be more when you export through this option; because it contains all the content of the site. This consumes more memory than other export options available.
Step 4. Once the “All content” option is selected click on “Download Export File” button to download the complete content to the XML file. WordPress will start Exporting all the content to an XML file.
As I mentioned above, memory consumes more when you Export all content. Sometimes this may cause an issue. Usually, you will see below Fatal Error when you attempt to export using this option:
Fatal error: Allowed memory size of xxxxxxxxx bytes exhausted (tried to allocate xx bytes) in <<php-file-name>> on linexxxx
How to fix the Fatal Error: Allowed memory size issue?
You can fix this, by increasing the memory limit for the PHP program to run. This limit can be mentioned in the WordPress’s configuration file or through “php.ini” file. Below are the steps to do this in WordPress’s configuration file:
Step 5. Login into your WordPress hosting panel as an Administrator and go to the root folder where you have installed your WordPress site.
Step 6. Look for the file wp-config.php where the WordPress site’s configurations are defined. Open the file to edit.
Step 7. Look for the definition entry WP_MEMORY_LIMIT in the file wp-confirg.php . Change it to the reasonable size, which is suitable to fix the issue. Usually below value should suffice.
define( 'WP_MEMORY_LIMIT', '96M' );
Note that, the changes may NOT work; if your hosting provider NOT allowed to increase the PHP memory limit. In such a case, you can follow the steps to export partial content at a time (this way memory is not consumed much, compare to exporting all content at a time) or contact your hosting provider to allow to increase the PHP memory limit.
Step 8. Once the changes are done, save the changes done in the wp-config.php file.
Step 9. Try again to Export all the content of your site (Step 4). If you still see the same Fatal Error; there might be some other reason for this issue. You can try exporting partial content instead of All content at a time. I will explain this in my next Article.
This is the way we can export all content of the WordPress site.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.