Developer Notes

Workaround for upload_max_filesize error when uploading WordPress plugin

When you are deploying changes to a WordPress website, you might encounter an error about PHP’s upload_max_filesize:

The uploaded file exceeds the upload_max_filesize directive in php.ini.

Just like the error explains, this means that the file you uploaded exceeds the configured limit of PHP for files uploaded to the server.

This can be a problem if you need to upload a large enough file to the WordPress website. This is not just for uploading large files like images and videos to the WordPress website, but you might also occasionally need to install private WordPress plugins that are not available in the public WordPress plugin directory.

If you do not have access to the server configuration (or if it is not available at the moment), you might find the following workaround useful.

File Manager Workaround

You can install a WordPress plugin that provides a file manager to the WordPress website admin section. Then, using the file manager, you can upload the files not as one large file but as multiple files.

For example, instead of uploading a plugin as a single ZIP file through the web interface, you can upload the decompressed files of the plugin to the plugin directory of WordPress. By uploading them as individual files, you might be able to avoid the file size limit.

You don’t even need to worry about retaining file paths if the file manager supports uploading a folder as is.

Here are some specific steps you can do:

  1. Install and activate a file manager WordPress plugin, such File Manager Advanced by modalweb. There are many options in the WordPress plugin directory.
  2. Go to the file manager.
  3. Navigate to wp-content/plugins/.
  4. Extract the WordPress plugin ZIP file in your computer.
  5. Upload the WordPress plugin local folder.
  6. In the plugin management page of WordPress, activate your newly uploaded plugin.
  7. And lastly, you might want to uninstall the file manager plugin if you no longer need it.

Important Reminder

Make sure that the plugins you install are safe!

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Articles

Want your website to turn up in Google Search results? You can submit your website for indexing in Google Search
Occasionally, we need to bring our website visitors to a maintenance page. Don't worry, you can spin up a Maintenance
After installing Android Studio in Ubuntu, you might experience getting a blank screen instead of the Android Studio Setup Wizard.
It might surprise you how much storage space Snap packages use. You will most likely find that your Snap packages
The Loop Grid widget allows you to set the total number of items to load and display in the Loop
When creating a page, always remember this: DESKTOP ➤ TABLET ➤ MOBILE. Responsive attributes you set for Desktop will reflect

Recent Articles

Topics

Related Topics