Update from Ubuntu 18.04 to 22.04
-
Hi all,
I just upgrade my Ubuntu Server from 18.04 to 22.04. I forgot that i may get problems with my site. So now what i can do to fix the problems?
The upgrade “went well”… The Ubuntu server is ok but the site… -.-
Regards
The page I need help with: [log in to see the link]
-
Hi! Doing this upgrade , you lost the configuration files of your web server. You have to recover the configuration files of the apache webserver and install in the right places or create again the configuration files.
- This reply was modified 1 year, 9 months ago by Miguel Martinez Lopez.
Your web server is not processing PHP files at all.
Check your server to be sure you have a supported version of PHP (along with all the necessary packages) installed. And go over your Apache configuration and make sure you’re loading your installed PHP module and there’s a PHP handler directive for the version of PHP you’re running.
If necessary, simply install PHP afresh with something like:
sudo apt install php libapache2-mod-php
Enable the PHP module with:
sudo a2enmod php
The restart Apache:
sudo systemctl restart apache2
IMPORTANT: After you get this fixed, reset ALL passwords on the site, including WordPress user accounts, MySQL database password, and any API keys from external applications. Also re-generate your salts (open your
wp-config.php
file for instructions).This is necessary because as PHP is not executing on your server, the contents of all PHP files (including your wp-config.php file containing database access credentials and WordPress authentication salts) can be viewed directly in the browser… and sensitive information might turn up in search engines.
Hi thanks for the help.
Where is the configurations files? I have them i think in here, and the files still there:
/etc/apache2/sites-available
/var/web/rbarcia.pt
I have try sudo a2enmod php and restart services and didnt work.
One think i notice is that i cant enter in phpmyadmin. Is this the problem?
Best RegardsOne think i notice is that i cant enter in phpmyadmin. Is this the problem?
No, that’s not the problem.
Or more specifically, that’s a symptom, not the cause of the problem.
phpMyAdmin, as the name implies, is a PHP application. And as I mentioned earlier, PHP is not working on your server at all. That’s why your WordPress site — which requires PHP — is not working. And that’s why you also cannot use phpMyAdmin.
So, if anything, the fact that phpMyAdmin doesn’t work should confirm my assessment that your server isn’t processing PHP files.
Where is the configurations files? I have them i think in here, and the files still there:
/etc/apache2/sites-available
/var/web/rbarcia.ptThe path you’ve provided is the document root of your site… that is, where the WordPress files are stored.
Your problem is not related to WordPress at all. It’s a pure server issue.
So the “configuration” in question should be your Apache web server’s configuration file(s), not your WordPress files.
As your distro is Ubuntu, I’ll recommend that you post in a support forum dedicated to Ubuntu server administration (eg AskUbuntu.com, UbuntuForums.org, etc) where you’ll fund Ubuntu sysadmins who eat and breathe this sort of thing every day to help you to configure your server correctly to run PHP applications.
Please check your Apache server’s logs!
I suspect after this massive distro upgrade, the new Apache installed may not have the PHP module enabled at all, or the config may be pointing to an older version of PHP which got removed during the distro upgrade.
Please see:
https://stackoverflow.com/questions/73345264/php-not-running-after-upgrade-ubuntu
https://askubuntu.com/questions/1406082/apache-php-modules-not-upgraded-in-22-04
it seems static file like license.txt and readme.html are loading. enable debug to display the php error
it seems static file like license.txt and readme.html are loading.
That just shows the webserver, Apache, is working.
The problem is PHP.
enable debug to display the php error
You can’t get PHP (or WordPress, which requires PHP) to display PHP errors when PHP itself isn’t working at all ??
There is several problems i se.
“php8.1 is already the newest version (8.1.14-2+ubuntu22.04.1+deb.sury.org+1)”
I already have php 8.1 instaled but its says modulo php not installed when i try sudo a2enmod php.
sudo systemctl start php8.1
Failed to start php8.1.service: Unit php8.1.service not found.
So how can i solve this problems?
Thanks for help guysI notice i already have php8.2 but Failed to start php8.2.service: Unit php8.2.service not found. Still the same problem when i try to start the service.
sudo a2enmod php8.2
Considering dependency mpm_prefork for php8.2:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php8.2:
Module php8.2 already enabled
Its any dependency missing?
RegardsHave you reviewed and tried the solutions in the links I gave above 12 hours ago?
https://askubuntu.com/questions/1406082/apache-php-modules-not-upgraded-in-22-04
At this point, it’s probably best to ask in a Ubuntu forum. This is not a WordPress question.
● apache2.service – The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2023-02-06 22:08:02 CET; 13s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 26112 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 26117 (apache2)
Tasks: 7 (limit: 2180)
Memory: 17.8M
CPU: 118ms
CGroup: /system.slice/apache2.service
├─26117 /usr/sbin/apache2 -k start
├─26118 /usr/sbin/apache2 -k start
├─26119 /usr/sbin/apache2 -k start
├─26120 /usr/sbin/apache2 -k start
├─26121 /usr/sbin/apache2 -k start
├─26122 /usr/sbin/apache2 -k start
└─26123 /usr/sbin/apache2 -k startlrwxrwxrwx 1 root root 29 fev 6 20:13 php8.1.conf -> ../mods-available/php8.1.conf
lrwxrwxrwx 1 root root 29 fev 6 20:13 php8.1.load -> ../mods-available/php8.1.load
lrwxrwxrwx 1 root root 29 fev 6 20:31 php8.2.conf -> ../mods-available/php8.2.conf
lrwxrwxrwx 1 root root 29 fev 6 20:31 php8.2.load -> ../mods-available/php8.2.loadONce again, this is not a WordPress question. I strongly suggest you find a Ubuntu support list/forum/chat.
I have try that link but still dont work.
sudo systemctl start php8.2
Failed to start php8.2.service: Unit php8.2.service not found.
- The topic ‘Update from Ubuntu 18.04 to 22.04’ is closed to new replies.