So… I have two questions which I hope you can be so kind and assist me with…
1.) Moved to new virtual server running Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-57-generic x86_64) and after installing and importing the old DB from the old server/finalizing the installation of Invoice Ninja.
After that I wanted to run the artisan optimize and migrate commands so I also could go ahead an upgrade to the newest version, but nope.
At first the ‘PHP’ command itself was not recognized at all so I ran: apt install php8.1-cli
After that I cd to the folder:
cd /var/www/vhosts/somefolder and ran this command: sudo php artisan optimize
I’m receiving this error:
artisan optimize. Could not open input file: artisan
2.) Now a related issue is that on the old VPS server we had it ran only Apache over C-panel so I used this after an upgrade:
sudo -u www-data php artisan migrate
But the new VPs has Plesk which runs simultaneously both Nginx and Apache web server, so I am totally lost on how the command should be formatted because the apache owner www-data isn’t used with Plesk’s webserver owner which is called something completely different.
Any help on this would also be greatly appreciated so I can run the upgrade too…
Hi David.
I ran the command ls -l and here is the output:
I also found this guide in the Plesk documentation:
It seems that you cannot just run it in one go as there is several file/folder users which is not the case in a normal server (Raw Linux/Linux C-panel or even a Windows server), where data is just owned by www-data or IUSR_ in ISS?
The obvious question here of course is how you format the artisan maintenance command for Plesk which is a bit of a conundrum to me still.
Yes, just like I did on my older server. But that was just simple “raw” Linux server so it just did it straight away. On Plesk as you could see not so much where it gives you there error:
And then after that is done:
Head for your favorite SHH client like Bitwise Simple URL Shortener which is my fav for example and login with your Plesk subscription ftp/SHH user and…