Wordpress theme upload error PCLZIP_ERR_BAD_FORMAT - php

I'm new to php as well as wordpress however because of some need I had to work with wordpress only. So just to start I read a tutorial and created a wordpress theme of my own and when I tried to upload my theme I got the below error:
The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature
Searching for the same I've found that usually the cause of such an error is maximum available space or upload file size issue. However since I'm working on localhost I don't think it could be the case. Moreover I've increased the upload_max_filesize, post_max_size and memory_limit as well. But still I'm getting the same error.
I'm using Wordpress 3.5.2.

This error due to you are trying to upload Other than ZIP Compressed version. Other format is not supported while uploading the plugin in wordpress.
You should unzip your plugin and make sure you compress with ZIP format and upload it will be working fine.

One of simple alternative is to download theme package, upzip it and upload through FTP whole theme folder into
/wp-content/themes
Then go to Admin CP and switch to new installed theme.

please check that only those file are here that you wan to upload. i was getting same problem, then i search on folder, there was already zip folder in it. after uploading that zip file. the problem was solved. Now the themes is activated.

I had this problem while trying to install Wordpress plugin from the Wordpress interface. Turns out the disk space quota was full for that specific account. I went to WHM manager and increased the quota and the problem was solved.

I got this error when I had the zip-plugin not installed. For Ubuntu/Debian and php7.4 (Bionic) you can use
apt-get install php7.4-zip
service php7.4-fpm restart

I had a similar problem when I was installing plugins for a theme. It appeared that in the meantime plugins' download url had changed, updating it solved the problem :)

I found one more case which may help you.
It throws the same error if the zip file is incomplete or corrupt.

This is because you are uploading the theme as a ".rar" file.
Convert the theme into ".zip" file and then upload it to your site.
For converting into the ".zip":
Right-click on the folder of your theme folder.
Select "Send to".
Click on "Compressed (zipped) folder".
Upload ".zip" file to your WordPress site.

I had the same issue, it turned out the problem was that the virtual server had exceeded its quota. (I'm using Virtualmin, and had a 1GB quota on that website's virtual server).
After increasing the quota, the problem went away.

Related

Wordpress Upgrade: Unable to update from Wordpress 3.8 to the latest using WP-CLI due to missing MySQL extension

I've moved a legacy site on Wordpress 3.8 from one server to another. The new server is on PHP 7 and I continue to get the error below:
Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
I've tried installing the Wordpress command line tool WP-CLI but still get the same error.
What should I try next?
You are going to need to do a manual update.
Download the current/or version you need and once you’ve downloaded it, extract the zip file to your computer. Then, open the folder that contains all of the WordPress files and delete the following items:
The wp-config-sample.php file.
The wp-config.php file (you might not see this file – just make sure to delete it if it’s there).
The wp-content folder.
Once you’ve deleted those items, upload the remaining files/folders to your server via FTP. When prompted about duplicate files by your FTP client, tell it to overwrite all files:

Wordpress Image Upload time error : Post-processing of the image failed

Facing an error while uploading images in Wordpress 5.3:
Post-processing of the image failed. If this is a photo or a large image, please scale it down to 2500 pixels and upload it again.
Fixed by increasing client_max_body_size to something like 100/200M(if you use nginx).
This same issue I faced after updating my WordPress to latest version 5.3. For a quick solution as of now, you can get over this by uploading the images to the media library first. Currently, if we are uploading images from anywhere else it’s showing the same issue.
I hope it helps.
I have tested it on my own website.
Hopefully, team WordPress will fix this soon.
WordPress 5.3 introduces this feature but it a bug. Until a WordPress update is released with a fix for the error, this is how you can disable this.
Simple add this line in your child theme functions.php file.
add_filter( 'big_image_size_threshold', '__return_false' );
Just encountered this bug. There was an apostrophe (') in the image's filename - once I removed it, all was fine.
Uploading from incognito window solved my problem.
WordPress 5.3
Here is one more step to help you debug. Have your inspector open to the network tab and look at the post request and its response.
In our case the issue was a bad AWS IAM policy not allowing uploads to the S3 bucket.
Only viewing the message there was what lead us in the right direction to fix the issue. The WordPress error is pretty generic for (server did not respond with success).
I recently received this error because I had already uploaded an image with the same filename. I don't know why it couldn't say something accurate like "duplicate file name" instead of something wrong and meaningless like "if this is a photo or a large image, please scale it down to 2500 pixels and upload it again."
I got this error but it wasn't a Wordpress nor a php problem. If you are using nginx be sure that the setting client_max_body_size is not set to the default 1M (which means 1Mb only for images passed in a POST not using multiform/part). I increased it and everything worked fine.
I have another solution for this, just had this problem gladly could figure how.
First see if your handling PHP 7.1 further
Then, you need enable mbstring in cPanel
In servers having a cPanel, it is easier to enable mbstring. So, for cPanel customers we enable mbstring as follows:
Firstly, we login to the cPanel account.
Next, we go to the Software section.
Here, we click the drop-down to Select the PHP version.
Now, select the PHP extension mbstring.
Finally, click the save button.
Image to what to select in PHP Version
Updating php to latest version , plus activating imagick module on from cpanel > select php version fixed the issue ...
Just thought I'd add my two cents since I stumbled across it looking for a solution myself before finding one. Now I've just experienced this exact same issue from around the web and it seems specifically related to Wordpress in versions of PHP 7.2+ or something which requires the installation of "Imagick" as well which for Redhat/Centos can be done like so:
dnf install php-pecl-imagick
I was able to use this to get the files to upload again though I still had some other issues which were resolved by updating the a lot of the limits of PHP via this guide: https://websiteforstudents.com/fix-file-upload-issues-with-wordpress-running-on-nginx-on-ubuntu/
Yet one more possibility ... after trying all these other solutions with no luck, I checked the console and was getting a 500 error on the js upload script. This was due to some code in functions.php that "worked" in older php versions but not 7.4. Non-helpful error message.
mageMagick (part of php) is causing the problem. So, i just added this lines to wp-includes/functions.php to tell WordPress to use GD editor instead.
add_filter( 'wp_image_editors', function() {
return array( 'WP_Image_Editor_GD'); } );
The simplest way to tackle this problem is to change the php version from 8 to 7.4. The complete details are in this article Post Processing of image failed
For SVG files, the number of these curves or shapes should not be too many.
I had the same error and tracked it down to my password-protected wp-admin directory. Removing the password-protection solved it. (The password protection adds lines in htaccess in wp-admin, you can also remove those).
But I did not want to take the password protection away. What solved it for me, while keeping wp-admin password-protected was adding the following in the .htaccess at site root level (so not in the htaccess file in wp-admin):
# Exclude the file upload and WP CRON scripts from authentication
<FilesMatch "(async-upload\.php|wp-cron\.php|xmlrpc\.php)$">
Satisfy Any
Order allow,deny
Allow from all
Deny from none
</FilesMatch>
Solution (and other solutions for other situations) found here:
https://docs.presscustomizr.com/article/229-fixing-errors-when-uploading-images-in-wordpress

WordPress website hook error

I have a problem with my site. I migrate the website to another hosting provider and website not working now. I dont know why. I tried reinstalling the files, WordPress version, turn off the plugins and nothing happend.
Is there anybody with experience in this error?
Fatal error: Class 'Requests_Hooks' not found in
/data/www/22560/nejrychlejsiauta_cz/www/wp-includes/class-wp-http-requests-hooks.php
on line 17
This means that the folder "Requests" does not exist, try to get it from another WordPress installation of the same version, compress it and upload it to the site where the error is, then unzip it and it will work.
Regards..
this is what worked for me with this same exact error. I had the file Hooks.php that went missing. It is located here: wp-includes/Request/ With my install theres a file named Hooker.php and Hooks.php in that same directory. I had an identical install in another directory for a diff site and after cross checking the files, Hooks.php was missing on the broken website. After I installed it back on the site, the site works fine.
Hopefully this helps someone!
This happens in a case when you copy, e.g. in Total Commander, and have left the field "convert file names to lowercase" checked. As the path to the class file is not wp-includes/requests/hooks.php but wp-includes/Requests/Hooks.php
So uncheck this option.

Responsive filemanager upload error

I have a problem in my reponsive filemanager plugin. I am using this plugin. On my localhost version it running smoothly but after I upload on my Centos server I can't upload the documents running on MS Applications like (excel and ms word). It turns it into a zip folder.
My system runs on Codeigniter 3 HMVC and I also set the permissions of responsive filemanager (source and thumbs) permission to 777.
Images are working fine and txt. I also try to addType the ms application on my httpd.conf file and restart my server and it still same error.
Can you help me with my problem? I really want to use this plugin because it has a nice UI and settings. I don't know if it is a server problem.
I know its kinda late but this is how I solved this issue.
go into 'pathToFilemanager/include/mime_type_lib.php'
and comment or remove "application/zip" => "zip" from your $mime_types array.

Just installed the news extension and it crashed my Magento

Just installed the extension and it crashed my Magento site. I'm tried so but it not working Does anybody help what to do?
Just open app->etc->modules-> and find the .xml file that you currently installed. and Open this xml file and edit
<active>true</active>
to
<active>false</active>
then clean cache from var->cache
hope this will recover your problem.
thanks
Just delete the temperory file "maintenance.flag" from root directory then your website will works back.
Hope this will help :)
When an extension is being installed, a temporary file is created to set the magento website unavailable to the public. Check if the file is there and delete it. The file is named maintenance.flag and placed at the root folder of your magento installation.
Otherwise provide more information to get support but normally this place is for development problem and you should contact the author of the extension.

Categories