How to select PHP version on One Click Wordpress VPS

edited January 11 in Help

Hi all,

I have been trying to upgrade/switch the PHP version on my One Click Wordpress VPS from 7.3 to 7.4 but with no luck.

I have updated/upgraded to PHP7.4 but nginx is still using 7.3.

All the guides mention I need to change the version number of 'fastcgi_pass' in nginx .conf file. But with the One Click Wordpress VPS the 'fastcgi_pass' field is set to 'php-handler-http'


Can anyone please point me in the right direction to change PHP version on One Click Wordpress install? Cant believe I have spent 4 hours on this 🤣


Thanks so much for reading, let me know if you need any more info


Here is my .conf file for fullness:


upstream php-handler-https {
	server 127.0.0.1:9000;
}

server {
	listen 443 ssl default_server;
	server_name _;
	#server_name wordpress.example.com;

	ssl_certificate /etc/nginx/ssl/server.crt;
	ssl_certificate_key /etc/nginx/ssl/server.key;

	root /var/www/html/;
	index index.php;

	# set max upload size
	client_max_body_size 2G;
	fastcgi_buffers 64 4K;

	access_log /var/log/nginx/wordpress_https_access.log combined;
	error_log /var/log/nginx/wordpress_https_error.log;

	server_tokens off;

	location = /favicon.ico {
		log_not_found off;
		access_log off;
	}
	location ~ \.php(?:$|/) {
		fastcgi_split_path_info ^(.+\.php)(/.+)$;
		include fastcgi_params;
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
		fastcgi_param PATH_INFO $fastcgi_path_info;
		fastcgi_param HTTPS on;
		fastcgi_param PHP_VALUE "auto_prepend_file=/var/www/html/xhprof/external/header.php";
		fastcgi_pass unix:/run/php/php7.4-fpm.sock;
		fastcgi_read_timeout 60s;
	}

Comments

  • Hello,

    To ensure your WordPress site is secure, you should upgrade your server to a new One-Click app periodically. We do not recommend attempting to upgrade PHP or other components in your One-Click app. Vultr tracks of all the components and applications we ship in every One-Click app to ensure they are secured for you to use. Patching or upgrading individual components is not supported for Vultr One-Click apps.

    We have an upgrade guide here: https://www.vultr.com/docs/upgrade-one-click-wordpress

    I consulted with our support team about your post, and they sent me this reply:

    ---

    It appears you updated your `fastcgi_pass`directive to point to the `/run/php/php7.4-fpm.sock` file instead of the default 127.0.0.1:9000 that our image uses for php 7.3. This is okay, assuming PHP-FPM for 7.4 is configured to use the socket file instead of the loopback IP and port. However, if NGINX is still handing the requests off to 7.3, then it appears it did not get updated to use the new configuration - did you restart or reload it? You can do so with either of the following commands:

    systemctl restart nginx

    OR

    nginx -S reload


    ---

    For fastest support, please open a support ticket. https://my.vultr.com/support/create_ticket/

    Thanks!

    --- David

Sign In or Register to comment.