Sometimes you might be presented with an annoying question saying “Are you sure you want to do this?” by WordPress during uploading plugins or themes. This error is produced due to insufficient memory and other resource allocation to your WordPress installation. Here are the simple ways to fix this issue.
This error is generally resulted due to PHP memory value, the max execution time for scripts, input vars number, and other values set at lower limits.
Simply edit the PHP configuration for your WordPress site (by editing php.ini) and modify these values:
- Increase the memory_limit to at least 256M
- Increase max_execution_time and max_input_time to 120 seconds
- Set max_input_vars limit at 10000 (10K)
- Set upload_max_filesize limit to 1024M (1G)
Tweaking the PHP resource limits to the above-suggested values should fix your all issues. Don’t know how to modify these values? Here are the ways to go.
For cPanel Users
If you use cPanel, then you should be able to edit the PHP configuration directly from the cPanel interface or from WHM if you are running your site on a VPS.
For a VPS, the process to edit the PHP configuration may vary a little because older versions of WHM present a single configuration editing page while in newer versions of WHM, you will have to edit the configuration values for each installed PHP version by selecting the versions from the drop down one by one. In a newer version of WHM, you will find an option labeled as MultiPHP INI Editor while in an older version, the option is labeled as PHP Configuration Editor. You can search for these labels from the search field (in left sidebar) to reach the configuration editor page.
After making the changes, you might need to reboot Apache for the changes to take effect. If you can’t deal with these steps, simply ask your hosting support or you can hire a server admin on Upwork or any other freelance platform to get this done for you.
For Non-cPanel Users
If you are using any other control panel or if your server is configured without any control panel, then simply do a Google search to find guides on how to edit the configuration file for PHP on your system. The idea is to edit the php.ini (or the loaded configuration file) on your system to increase the memory limit, upload file size limit, input vars limit, and execution time.
Did increasing the values for the suggested PHP configuration options work for you? If something else worked for you, then I encourage you to leave a comment below so the fix will help others as well.