If you’ve recently opened your Synology WordPress dashboard, you may have seen a new banner that warns you about a required PHP update. The message is as follows:
WordPress has detected that your site is running on an outdated version of PHP.
What is PHP and how does it affect my site? PHP is the programming language we use to build and maintain WordPress. Newer versions of PHP are both faster and more secure, so updating will have a positive effect on your site’s performance. Learn more about updating PHP.
Apparently, although you have correctly installed PHP 7.3 on your Synology Nas and you have correctly configured the WebStation, WordPress informs you that you are using an outdated PHP version. This happens because the official WordPress package released by Synology both requires and “forces” the installation of PHP 5.6 in order for the WordPress package to work. Whose fault is it in this case? Obviously, Synology isn’t worried about upgrading these packages and is behind on this front.
First of all, if you want to continue using the WordPress package released by Synology, you have to download the “PHP 7.0” package from Package Center because this solution will not work with PHP 7.3 until Synology updates the WordPress package. (Speaking from experience, it can take months until Synology updates packages).
After successfully downloading PHP 7.0 set it on WebStation as Default Profile. Now, go to the main WordPress folder and double click on your .htaccess file (Download it, modify it in notepad, then upload it in the main WordPress folder overwriting the old one). But remember to always make a backup of your old .htaccess file just in case something goes wrong.
Modify this line:
The final result should look like this:
# Synology PHP
AddHandler default-handler .htm .html .shtml
AddHandler php-fastcgi .php
AddType text/html .php
Action php-fastcgi /php70-fpm-handler.fcgi
# Synology PHP
Note: remember to change Default PHP profile on WebStation and set it to use PHP 7.0
The ideal solution for not having problems like this with PHP and WordPress is to read my previous post: How to Manually Update a New WordPress in Your Synology. To make mariushosting.com run like a charm, I only use the official version of WordPress released by wordpress.org not the official package released by Synology.