WordPress stops working after ubuntu 22.04 upgrade.
-
Hi I am wondering if anyone can help, I have been asked to upgrade the Apache/PHP version on my ubuntu server that runs my wordpress website.
As I am running ubuntu 20.04 I have since found that this is EOL so to upgrade Apache/PHP I need to upgrade my ubuntu version to 22.04.
I have tested this and I can upgrade the server however as soon as I upgrade my wordpress site no longer loads and I am not sure why. I should note I am not an export on Linux or wordpress.
Currently I am running ubuntu 20.04.6 (Trying to upgrade to 22.04)
My wordpress version is 6.8.2
According to wordprss my PHP Version is 7.4.16 (when I type “php -version” using ubuntu command line I get the following. PHP 8.0.3)
My Apache version is 2.4.59
Does anyone know what I need to do to get my wordpress site working again after I upgrade my ubuntu server?-
This topic was modified 7 months, 2 weeks ago by
nathanexact.
-
This topic was modified 7 months, 2 weeks ago by
nathanexact.
-
This topic was modified 7 months, 2 weeks ago by
-
What exactly do you see when you visit the website? A server-side error? To solve this, you first need to find out what the error is. The reason for the error should be visible in the error log. You can find it in your hosting area. If necessary, the support of your hosting can help you.
Alternatively, you could also enable debugging in WordPress. How to do this is described here: https://wordpress.org/support/article/debugging-in-wordpress/ – also here the support of your hosting can help you if necessary to edit the file accordingly.
In both cases you should be able to see what the cause is in the logfile.
thanks for your reply, before the upgrade the site works fine after the upgrade however I click on the URL I get this.
<?php /** * Front to the WordPress application. This file doesn’t do anything, but loads * wp-blog-header.php which does and tells WordPress to load the theme. * * @package WordPress */ /** * Tells WordPress to load the WordPress theme and output it. * * @var bool */ define( ‘WP_USE_THEMES’, true ); /** Loads the WordPress Environment and Template */ require __DIR__ . ‘/wp-blog-header.php’;
I should note during the upgrade it asked me the following but I choose “no” for this (Hopefully the picture sends)-
This reply was modified 7 months, 2 weeks ago by
nathanexact.
So you see PHP code when you call it up? That means your server currently has no PHP enabled to interpret it. To solve this, you need to configure and set this up in your server system. Only then will WordPress be able to run again.
There are numerous guides on the internet for this for Ubuntu 22.04, e.g. this one: https://www.digitalocean.com/community/tutorials/how-to-install-lamp-stack-on-ubuntu
Please note that this is more a question of hosting setup. That is not the topic of this forum. If you have questions about configuring your server system, it is best to contact a community that supports exactly that. For Ubuntu, you can find a forum here: https://discourse.ubuntu.com/
If you need personal support, you can probably find it here: https://jobs.wordpress.net/
Thank you I will take a look tomorrow and see how I get on.
Hi, I know you sent this guide yesterday however this seems to read as if I have to install Apache/MYSQL/PHP however I already have all this installed already.
Is there anything else I can try to get this working?You not only have to install it, but also configure it – in particular, PHP must also be installed and configured. As far as I can see, the instructions above contain this information.
ok thanks it’s just as they were already installed are you saying I will need to reinstall them?
I can’t tell since I’m not familiar with the system. You might need to tweak the configuration on the web server service. Check out the instructions above; they should cover everything. If not, reach out to the community mentioned above that knows and supports this system.
ok thank you I will try reaching out to the community and see if anyone can help me further.
-
This reply was modified 7 months, 2 weeks ago by
nathanexact.
Hi I have now managed to get my wordpress admin page to load however my website gets the following error.
“Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the acf domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/www.exactlibris.com/public_html/wp-includes/functions.php on line 6121”
I have looked in funtions.php however I am unable to find “_load_textdomain_just_in_time”
can you point me to where I can fix this error please?These PHP notice (not errors) on your screen appear because your plugin
Advanced Custom Fieldsis not compatible with changes in WordPress 6.7.x (and newer). To solve this you can do one or all of:- Install all pending updates. The plugin developers may have already provided a fix.
- Disable the output of PHP notices. This either happens because your WordPress is running in debug mode OR your hosting is outputting PHP errors. The support of your hoster might help here.
- Or downgrade to WordPress 6.6.2 and then wait some time until you go back to 6.8.x until the plugin/theme developers have caught up.
- Or simply wait until the plugin developers make changes in this regard. You might want to contact their support: https://wordpress.org/support/plugin/advanced-custom-fields/
See also the information from the core developers about the upcoming changes for theme developers from a year ago: https://make.wordpress.org/core/2024/10/21/i18n-improvements-6-7/
Thanks for this. Being that our theme is bespoke and can’t be updated the only option to fix my site is to downgrade wordpress to 6.6.2. Could you tell me how to do this form command line on a ubuntu server please or if I am able to do it via wordpress admin.
This is strange however as before I upgraded my ubuntu server the theme worked fine and wordpress what the same version.-
This reply was modified 7 months, 1 week ago by
nathanexact.
The above message refers to the ACF plugin, not the theme. Of course, the theme may be dependent on it. However, the message can only be resolved in the manner described above.
The simplest would be the one I have marked in bold. Simply disable the output of PHP messages in your hosting and you’re done. You probably didn’t see this before because the output of PHP messages was not enabled there. The different settings in the new system now lead to such changes in behavior.
A downgrade of WordPress would of course also be possible, but can have far more consequences. There are 3 ways to do this:
- Via WP CLI on the console: https://developer.wordpress.org/cli/commands/core/update/ (with force parameter)
- Via manual update as described here: https://wordpress.org/documentation/article/updating-wordpress/#manual-update
- Via plugin: https://wordpress.org/plugins/core-rollback/
Please note that if you downgrade, you may also lose some plugins that are not compatible with the old version. This can also result in much more serious problems than a PHP notice. I would still recommend disabling PHP notices.
Hi, thanks but disabling the output of PHP notices won’t help as I manually enabled it to begin with to help diagnose why my site doesn’t run.
I have tried downgrading to 6.6.2 however my site still doesn’t load, I have put my site back to 6.8.2 . Do you have any more Ideas on what I can do. in the logs I see the following.
Fatal error: Uncaught Error: Undefined constant “options” in /var/www/www.site.com/public_html/wp-content/themes/libris/header-light.php:3If you have only enabled output for debugging purposes, you can ignore these notices. Once you have finished debugging, this output will disappear.
However, the other issue you mentioned is indeed a PHP error. This occurs in the “libris” theme you are using. However, I cannot find any references to a theme with this name online, so I cannot comment further on this. The theme may be extremely old and therefore no longer compatible with modern PHP, for example. You have several options for solving this problem:
- Contact the theme’s support team, if it still exists somewhere. If it is a purchased theme, you may also find information about it in your license invoices.
- Look at the source code of the theme and adjust the parts that are reported as errors.
- Find someone to help you customize the theme so that it runs without error messages. You can find someone like this here, for example: https://jobs.wordpress.net/
- Use a different theme. Of course, this also requires building a new front end, so it’s not necessarily a quick fix. There are thousands of current free themes to choose from: https://wordpress.org/themes/
-
This reply was modified 7 months, 2 weeks ago by
The topic ‘WordPress stops working after ubuntu 22.04 upgrade.’ is closed to new replies.