As I was trying to update the company website today, I was getting bombarded with errors while I was trying to upload images. These errors eventually caused a number of 503 errors, to which I had no clue what the cause was. After digging around for several hours, it seems that the issue was related the to APC extension.
We’re running our server on Amazon Web Services (AWS) and were using the Bitnami WordPress AMI, which auto-enables this extension and thus in order to fix it temporarily, we had to disable it. In order to do so, all you need to do is the following:
- Browse to:Â /opt/bitnami/php/etc
- Using your favorite editor, edit the php.ini file.
- Search for the line that saysÂ extension=apc.so
- Add a semi-colon to the start of that line to comment it outÂ ;extension=apc.so
- Restart Apache Â -Â /opt/bitnami/ctlscript.sh restart apache2
- Restart PHP-FPM -Â /opt/bitnami/ctlscript.sh restart php-fpm
Once you’re done, your website should work normally again. Obviously we’d still want this extension to handle our cache, so feel free to use another until the bug is fixed.