'admin-ajax.php - the server responded with a status of 500 (Internal Server Error)

I've drawn a complete blank with this if anyone can help. I have migrated a website from from a NGINX server to Apache. The installation works fine on NGINX but am running in to the following issue since the migration.

This is a WordPress installation, version 4.9.5 on an Apache server with PHP 7.2

I am constantly getting an error when trying to publish theme customisations.

Looks like something’s gone wrong. Wait a couple of seconds, and then try again.

The console shows the following error for file /wp-admin/admin-ajax.php

Failed to load resource: the server responded with a status of 500 (Internal Server Error) 

I have taken the following troubleshooting steps to no avail -

  • Increased memory and size limits to 256M
  • Downgraded to PHP 7.0
  • Reinstalled core files in /wp-admin and /wp-includes
  • Removed .htaccess in case of corruption
  • Confirmed no PHP errors using WP_DEBUG (true)
  • Confirmed file permissions are as they should be
  • Deactivated any non essential plugins.


Solution 1:[1]

I just changed php version from 8 to 7.4 and problem solved! (Downgraded php worked for me)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mohammad tahamtan