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:


[PHP]
; We highly recommend that you leave this options enabled
cgi.fix_pathinfo=1

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

; Increase execution time
max_execution_time = 100000

; save in local tmp
session.save_path=/home/56072/data/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?

Thanks.

Answer : Cannot import WordPress XML backup!

http://codex.wordpress.org/FAQ_Working_with_WordPress#How_do_I_Import_a_WordPress_WXR_file_when_it_says_it_is_too_large_to_import.3F

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