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:

 * 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'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 Nov 1 '19 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.com/questions/5121495/… – Kumar Nov 1 '19 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 Nov 2 '19 at 10:36

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.