Question : Cannot import WordPress XML backup!

My website got hacked and so I downloaded the whole thing with FTP and also exported a WordPress .xml file. Then I deleted everything and re-installed WordPress. I set the permalink structure to default (same as before) and am using the following php.ini file in the html directory for my domain:

; We highly recommend that you leave this options enabled

; Increase maximum post size
post_max_size = 60M
upload_max_filesize = 60M

; Increase execution time
max_execution_time = 100000

; save in local tmp

In WordPress I go to Tools -> Import -> WordPress and upload and import my WordPress xml file, which is 40mb in size.

It uploads, but then gives the following error:

"Sorry, there has been an error.

File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini."

But it's not empty; I can open the whole thing in a text editor and see all my content there. Also, you can see in my php.ini that my post_max_size is the same size as upload_max_filesize.

What can I do?


Answer : Cannot import WordPress XML backup!

I didnt see you reference the memory limit, as shown in the above link. It says:

       1.  Increase the memory limit setting in php.ini (e.g. memory_limit = 64M ;). Many hosts may not allow this.
       2. Increase the memory limit via .htaccess (e.g. php_value memory_limit 64M). Many hosts may not allow this.
       3. Increase the memory limit via wp-config.php (e.g. define('WP_MEMORY_LIMIT', '64MB');)

Random Solutions  
programming4us programming4us