The Slider Revolution WordPress plugin (version 5.1 and earlier) produces an error when one tries to export a slider, and then import the resulting ZIP file into another WordPress installation. The error verbatim:
importing slider settings and data...
Error: slider_export.txt does not exist!
When I went into the revslider code, I discovered the following line in slider.class.php
:
$unzipfile = unzip_file( $filepath, $d_path);
if ( $unzipfile ) {
If you check the doc, it says that unzip_file
will return either true (if the operation was successful) or a WP_Error
instance. The if
will therefore always pass, even when unzip_file
returns an error. Very bad code for a paid plugin (personal subjective opinion).
To discover what your particular issue is, you can enable debugging in WordPress and insert the following line between the two lines above:
error_log( 'unzipfile returned: '. print_r( $unzipfile, true ) );
In my case, there was something wrong with the archive. Here is what the error object contained:
[32-Dec-2015 17:13:42 UTC] unzipfile: WP_Error Object
(
[errors] => Array
(
[incompatible_archive] => Array
(
[0] => Incompatible Archive.
)
)
[error_data] => Array
(
[incompatible_archive] => PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature
)
)
There was something wrong with the ZIP file itself. I got a clue from this post: unzip the archive and zip it again. That worked for me like a charm (thank you, thefighter14).
unzip -l slider_name.zip
zip -r slider_name_new.zip *
Hope it helps at least one person (please put a star on this if it helped you - I'd like to know).
I had the same problem, I solved it by zipping the file "slider_export.tx" alone and by importing it only, after dezipping the backup.
Import this zip, always in the back office of destination by means of revolution slider.
Send by ftp the other files (css and pictures) in directories:
/www/wp-content/plugins/revslider/public/assets/css/ for css
/www/wp-content/uploads/ for pictures.