It might be PHP’s memory allocation.
Here are three ways to increase PHP’s memory allocation:
- If you can edit or override the system php.ini file, increase the memory limit. For example,
memory_limit = 512M
- If you cannot edit or override the system php.ini file, add
php_value memory_limit 512M to your .htaccess file.
- If neither works, it’s time to temporarily ask your hosting provider to increase PHP’s memory allocation on your account. Keep in mind that most decent hosting providers temporarily allow users to increase the memory allocation. If your hosting provider won’t accommodate you, perhaps it’s time to find a new one. We have some recommendations at https://ww.wp.xz.cn/hosting/
(in the above examples, the limit is set to 512MB)
If that doesn’t make any difference, what specifically is the error when it fails?
So I checked the memory_limit settings on my domains, and according to CPanel’s MultiPHP INI Editor, it is set to 1024M on all of my domains.
The failing updates usually don’t state any errors. The update just starts, then it enters into maintenance mode, and after a while it just seems to time out. The outcome can usually be two things:
- Some or all of the updates are not performed. The automatic update will schedule it to another time (when it usually fails again).
- Sooner or later one of the updates are screwed up, leaving a non-functional plugin that usually breaks the site until the plugin is either deleted or fixed by a manual FTP update.
If I leave it unattended, 2) will happen in a couple of weeks. What I observed is that small plugins usually update correctly when started alone manually. Larger plugins and/or themes (like Woocommerce or Avada) fail more often than they update correctly even when the update is started manually. However, sometimes on one domain a large plugin/theme will update correctly, while it keeps failing to update on other domains. All domains are hosted on the same server. This behavior feels like a server issue, but I have no idea what. But unless the CPanel memory_limit is bogus, that should not be the issue.
In your site’s Dashboard, head over to Tools -> Site Health -> Info -> Server.
What is listed there for “PHP memory limit”?