DEV Community

Cover image for WordPress plugin updates shows -1
Edward Anil Joseph
Edward Anil Joseph

Posted on

WordPress plugin updates shows -1

Problem

We had an issue with a WordPress website, which wouldn't allow us to update or install any plugins.
When we try updating a plugin, the page would show just "-1".

Even adding a new plugin would show a "-1" error.
There wouldn't be any error messages or clue on what went wrong.
Even enabling debugging the WordPress site did not provide any clue on what caused this issue.

If you check the developer console of the browser, it would show that the "wp-admin/admin-ajax.php" throws a "403 error".

And the problem is that WordPress would create a ".maintenance" file when you update the plugin. Now the site would go to Maintenance mode and will not be available, unless you manually delete the ".maintenance" file via FTP.

Details

The WordPress website had many plugins. And it had the following plugins installed in it:

  • Autoptimize
  • Elementor
  • Page Builder by SiteOrigin
  • Really Simple SSL
  • Starter Templates (from Astra)
  • Sucuri Security - Auditing, Malware Scanner and Hardening
  • Super Page Cache for Cloudflare
  • Wordfence Security

And the domain was using Cloudflare to make the site load faster and use the security feature provided by it.

The site was hosted in Ionos Web hosting package.

Steps that did NOT work

  • Tried to find out the issue by bypassing Cloudflare. It did not work.
  • Tried to stop the caching on the site and Cloudflare. It did not solve the problem.
  • Tried deactivating the security plugins. It did not solve the problem.
  • Tried removing "Really Simple SSL" plugin security options. Still the problem persisted.

Solution

We were on the verge of moving the site to another hosting provider, as we could not find the source of this issue. And the hosting support could not find anything wrong with their servers or system.

And then finally, I came upon this solution on WordPress support forum.
https://wordpress.org/support/topic/plugin-updates-shows-1/

It stated that the issue is with Starter Templates (from Astra).
I just deactivated that plugin and the updates of other plugins worked smoothly.
And later on, I updated the Starter Templates plugin to the latest version.
If you face this kind of issue in the future, please check if you have installed Starter Templates. Just deactivate it and work on the other updates.

Top comments (0)