Three days  Back  Techno360 site has faced a sever problem, our site database got corrupted due to the use of Cache Plugin, many users have noticed this problem, after clicking “Read Full Article”, it started displaying Blank pages or 404 error pages.

Although I deactivated and deleted the plugin, but the database got corrupted and I’m unable to rectify it by doing Database optimization or repairing . So I finally decided to re-install wordpress from scratch, then exported my posts via Tools section and downloaded WordPress WXR file, an XML file exported from WordPress.

Now another problem started, the exported file is too large to import which is around 12 MB , but the max upload size Limit for wordpress is 8 MB.

So I googled and found several suggestions as listed below

1.Increase the memory limit via wp-config.php by adding a line    define(‘WP_MEMORY_LIMIT’, ’64MB’);
2.Increase the memory limit setting in php.ini ,as shown below

memory_limit = 64M
upload_max_filesize = 100M
upload_max_filesize = 100M
post_max_size = 100M

Above two didn’t worked for me, so I went for the third suggestion
3.Increase the memory limit via .htaccess by adding a line php_value memory_limit 64M

Immediately by host blocked my blog directory and said Mod rewrite is not allowed to increase the memory because of security issues.

[ad#ads-inner]

The Solution that Worked for Me: Gzip

Finally I searched in WordPress FAQ and found this wonderful tip or solution that saved my day.

GZip the WordPress WXR file, the XML file exported from WordPress, after I Gzip the file with the help of 7zip, the compressed file is around 1.5 MB. So I Immediately uploaded it, although it had taken time to extract and Import all posts, but the result was successful.

I didn’t doubted whether Gzip method works or not , because normally when you click “Automatic upgrade” for certain plugin, then your host will download the Gzip file of that plugin, then wordpress automatic installer will extract that plugin files and install them.

How to Gzip a file

  • On Windows, right click your .xml file, using 7 zip, click “Add to archive” and change the Archive Format
  • On Linux, use the gzip command line.
  • Make sure that the resulting file has the file extension of “.gz” before uploading it, as this is often necessary.
  • I think this post will be useful for WordPress users who have/had/would fall or fallen in same pit.