Webinoly is just the perfect tool for NGINX experts. Give it a try!
+1 vote
by Rookie
So I discovered the stack command to set php version. I had php versions from 5.6 up to 8.0 installed on my DO droplet but Webinoly WP insisted on using 7.2.x.

So I ran the 'stack -php-ver=7.4' command. The command ran forever and finally I had only version 7.4 left. Not what I wanted. There really should be more of a warning here.

But worse than that, now none of the 4 WP sites work at all.

How do I relink them to this one and only php version correctly?

1 Answer

+1 vote
by Expert
This is totally out of our hands!

Webinoly has never supported multiple PHP versions, if you have this configuration is because you manually did it and it's out of the scope of this project.
by Expert

By the way, from our docs:

If you currently have a different version installed, this command will perform the uninstallation of the previous version.

Isn't it clear?

by Rookie
OK - should have read up better then. Losing all the redundant php versions is not the big problem here. But that my wp installations now no longer links to or ca use the installed php 7.4. So how do I link them together?
by Rookie
Note: the command did not only uninstall previous versions but also the newer version 8.0. So the warning text might need some rephrasing.
by Rookie
Here is what a webinoly -verify tells me:

Verifying integrity of the entire Webinoly system...

(1) Webinoly Integrity Test successful!

- [ERROR] File: /opt/webinoly/templates/source/nginx.conf not found!

(2) NGINX Verification Test successful!

- [ERROR] File: /etc/php/7.4/fpm/php.ini not found!

- [ERROR] File: /etc/php/7.4/fpm/php-fpm.conf not found!

- [ERROR] File: /etc/php/7.4/fpm/pool.d/www.conf not found!

- [ERROR] File: /opt/webinoly/templates/source/www.conf not found!

- [ERROR] File: /opt/webinoly/templates/source/php.ini not found!

- [ERROR] File: /opt/webinoly/templates/source/php-fpm.conf not found!

(3) PHP Verification Test has failed!

- [INFO] MariaDB (MySQL) v10.5 is recommended to get an optimal perfomance!

(4) MySQL Verification Test successful!

- [ERROR] PHP service not running!

(5) Service Status Verification Test has failed!

(6) Operating System Verification Test successful!

(7) Additional Tools Verification Test successful!

- [WARNING] File permission is not 644 /var/www/yeboworld.com/htdocs/wp-content/wflogs/config.php

- [WARNING] File permission is not 644 /var/www/yeboworld.com/htdocs/wp-content/wflogs/template.php

- [WARNING] File permission is not 644 /var/www/yeboworld.com/htdocs/wp-content/wflogs/config-synced.php

- [WARNING] File permission is not 644 /var/www/yeboworld.com/htdocs/wp-content/wflogs/config-transient.php

- [WARNING] File permission is not 644 /var/www/yeboworld.com/htdocs/wp-content/wflogs/config-livewaf.php

- [WARNING] File permission is not 644 /var/www/yeboworld.com/htdocs/wp-content/wflogs/attack-data.php

- [WARNING] File permission is not 644 /var/www/yeboworld.com/htdocs/wp-content/wflogs/ips.php

- [WARNING] File permission is not 644 /var/www/nevergreens.se/htdocs/wp-content/wflogs/config.php

- [WARNING] File permission is not 644 /var/www/nevergreens.se/htdocs/wp-content/wflogs/template.php

- [WARNING] File permission is not 644 /var/www/nevergreens.se/htdocs/wp-content/wflogs/config-synced.php

(8) Permissions Verification Test has some warning messages you should attend!

(9) Sites Verification Test successful!


********      > > >  E R R O R < < <        ***********

********   System could not work properly   ***********

by Expert

I'm not sure, but please try:

# Run:
sudo stack -php-ver=7.3
# Then install 7.4 again:
sudo stack -php-ver=7.4
# Then try a server-reset:
sudo webinoly -server-reset=all

by Rookie
OK - I will try this. I do get a lot of 'cannot access parent directories'  when trying to reinstall php 7.3

Do I need to be in a specific dir when doing any of this?
by Rookie
Hm, this just gets worse. After double stack-commands recommended above I now have no php version at all installed :(

I also tried installing php 7.4 manually and setting it up for nginx. But I do not know how to link it to Webinoly and I also cant seem to get FPM up and running. There is a lot of red output whatever I try to do.

I am now lost and so are my 4 websites. Please advice on how to proceed from here?
by Expert

The first time I read your issue I thought you were affected by an issue that occurred with PHP Ondrej PPA some months ago, that would explain why you were seeing more than one PHP version installed. Webinoly immediately released a patch for that at that moment, in some rare cases re-installing PHP twice is necessary. Seems like it's not the case!

Now, I think you have a very corrupted installation and packages. In a very normal Webinoly situation, re-installing PHP would be sufficient. In your case, I have no idea why it's failing. 

  • You said that the stack command is not removing all the previous versions. That's not correct!
  • You said that the stack command is throwing errors about "parent directories". That's not correct!
  • You said that now no PHP package is installed. That's not correct!
In summary, you're seeing a lot of errors, at this point you should consider a fresh installation from your backups.
by Rookie
OK - this is really sad but I guess I will have to spend a lot of time on this now.

Question 1: can I reinstall Webinoly without losing the sites themselves?

Question 2: Where exactly do Webinoly look for which version of php to use? Which files interacts between Webinoly and php?
by Expert
  • Yes, it's possible. You can remove all the packages and not delete the data folder. But, you will end with the same problem when trying to reinstall PHP again.
  • You can download some data via SFTP. Also, Webinoly has a backup command to automatize these things.
  • Read about the stack "-php-ver" command, that's where the PHP version is set.
by Rookie
Further investigation reveals that the problem is the same whether I try to install php 7.4 manually with apt install or with the stack command. What happens is that the fpm part of the installation is not complete. The /7.4/fpm/ dir remains empty and without php.ini or fpm-pool-files the FPM service can not start.

Can I have a sample of /php/7.4/fpm/poold/site-foo.conf file suitable for Webinoly?
by Expert

That's exactly what I told you, please, follow my advice:

  • Try to recover your data by any means, SFTP or any other.
  • Start with a new and fresh server.
  • Learn from this lesson, you should always have a backup and fast recovery plan. That's why we include some tools for this purpose.
Your current server is corrupted and you're just wasting time trying to fix it. The new paradigm with cloud servers is to be disposable (and scalable), you should always being ready to throw away your old server and start with a fresh one immediately, and Webinoly has all the tools that you need for that purpose.
by Rookie
OK - I thought I could learn something new here but I guess you are right. I can always destroy the droplet and spin up a snapshot (or whatever its called).
by Expert

Here are my recommendations:

  • You should always make a backup at least once a day (I do it 3 times per day) for files and databases.
  • You should have a fast recovery plan. People under high-stress situations don't have the same clarity for taking decisions. You need to have a written plan to follow with all the steps to recover your backup in a fresh server. You don't want to think, just follow the steps!
  • Never run a server (VPS) for more than 4 months without doing at least one "stop/start" cycle. In AWS this means that it will be reassigned to a new and "more fresh" physical server.
In Webinoly you will find all that you need to manage your server. Ideally, we can have servers running for years with just some basic maintenance, but "shit happens" and you should always be ready for any unexpected situation.
by Rookie
You are of course right. Maybe I'm a bit too old for this new thinking :)

I have now replaced my DO droplet by restoring from an automated backup made just two days ago. Everything is now working fine (as it used to before issuing the stack command).

Now, how do I go about upgrading from php 7.2.34 to 7.4 properly so not to repeat this disastrous outcome?
by Expert
I don't understand, you now have a new server and you have 7.2 installed? Why? (7.4 is the default for new installations)

Anyway, the "-php-ver" is the only option to change the PHP version.
by Rookie
No, its not a brand new server. Its a restore of a backup from a few days ago when everything was working. This is a Digital Ocean feature I guess you can say.

So there is no other way to manipulate the php version or settings?
by Expert
In case that you decide to move everything to a new and fresh server. Please, read the docs, Webinoly has multiple options that can be very useful in these cases for backups and exporting/importing sites or complete servers.
Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.