For you who are using a hosting company for your WordPress, you may get some problem that you cannot use your WordPress properly. You cannot update your WordPress version, plugin, (and maybe) themes.
You already try all possible way to fix this problem such as updating your PHP and MySQL version on your hosting company, re-install your WordPress, etc. but no luck.
A new bug (maybe) found at WordPress that not compatible with several version of PHP: PHP v5.4.7 and PHP v5.4.14. This incompatible problem caused WordPress functions cannot work as it used to be.
You can check your PHP version by adding this code to your active theme header.php file (after body tag):
<?php phpinfo() ?>
To fix this bug, there are 2 methods you can use:
- Ask your hosting company to update/downgrade your PHP version (the lowest version of PHP you can use is v5.3 – if you are using WordPress v3.6)
- Downgrade your PHP version via .htaccess file
First method is very easy to do, so we will not explain it on this tutorial. We will explain on how to do the second method below.
To downgrade your PHP version via .htaccess file, you have to get an access to your FTP and go to your WordPress installation directory. Open your .htaccess file and add this code:
AddHandler application/x-httpd-php53 .php
This code will tell the web hosting if your file only work/require PHP v5.3 to work.
- Some web host may hide or don’t have a file named .htaccess (e.g: Yahoo! Small Business). In this case, you cannot use this technique
- If your web hosting PHP version is lower, for example: v5.2. You cannot use this code to update your PHP version to v5.3