I am on Ubuntu 18.04.
I just updated my server from PHP7.2 to PHP7.3 using this guide
After that, I changed my Apache from Prefork to Event using this guide
Now, when going to my Wordpress website, I see the following instead of a normal home page:
<?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( dirname( __FILE__ ) . '/wp-blog-header.php' );
Furthermore, now all the different pages and posts display a similar output (i.e. code is being displayed instead of an actual page)
Is this a known bug of PHP7.3 or have I done anything wrong?
Any help and suggestions will be much appreciated.
I am on Ubuntu 18.04.
I just updated my server from PHP7.2 to PHP7.3 using this guide
After that, I changed my Apache from Prefork to Event using this guide
Now, when going to my Wordpress website, I see the following instead of a normal home page:
<?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( dirname( __FILE__ ) . '/wp-blog-header.php' );
Furthermore, now all the different pages and posts display a similar output (i.e. code is being displayed instead of an actual page)
Is this a known bug of PHP7.3 or have I done anything wrong?
Any help and suggestions will be much appreciated.
Share Improve this question asked Oct 31, 2019 at 23:15 SidSSidS 1032 bronze badges 3 |1 Answer
Reset to default 0I've now managed to fix this issue and managed to successfully migrate form Prefork to Event.
For some reason Apache didn't let me sudo a2enmod php7.3
I entered sudo a2enconf php7.3-fpm
instead of the a2enmod
command above, I then restarted both Apache and the PHP FPM service with sudo service apache2 restart && sudo service php7.0-fpm restart
After it had restarted, going back to the Wordpress website revealed that the server is now able to read PHP code and display a normal Wordpress website.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745036754a4607567.html
<?php phpinfo();
would be enough of a test case on its own, get that working first before trying a full CMS – Tom J Nowell ♦ Commented Nov 1, 2019 at 1:00<?php phpinfo();
, The page would just display the code instead of outputting the actual PHP output. This was because PHP was disabled and the PHP-FPM module was not active. I've now managed to fix it by doing asudo a2enconf php7.3-fpm
and restarting both Apache and PHP FPM. – SidS Commented Nov 2, 2019 at 10:36