php - Upgrade to PHP7.3 and Changing Apache from Prefork to Event Breaks WordPress

I am on Ubuntu 18.04.I just updated my server from PHP7.2 to PHP7.3 using this guideAfter that, I changed my Apache from

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
  • I've never seen this but it doesn't look to be a WP problem but an Apache/PHP problem. TBH you're probably better off asking on ServerFault. I expect the classic PHP file with just <?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
  • It's related to server configuration for sure. Can you check if PHP is installed and running? This could be of help: stackoverflow/questions/5121495/… – Kumar Commented Nov 1, 2019 at 7:54
  • 1 @Kumar, @TomJNowell, when I tested my server with <?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 a sudo a2enconf php7.3-fpm and restarting both Apache and PHP FPM. – SidS Commented Nov 2, 2019 at 10:36
Add a comment  | 

1 Answer 1

Reset to default 0

I'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

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信