Local not loading/executing site php files

Hello,

First, I want to say that the latest versions of LOCAL have been super solid so bravo. Yet I just ran into an error trying to load a site.

Never seen this issue before. Just updated my site to WP 4.9.8 using LOCAL without any errors.

Now when I try to visit my site, it just outputs the php files without executing them. This is what displays when I access the site:

<?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' );

Obviously LOCAL is supposed to execute this file, not display it. If I try to access /wp-admin/ it shows the contents of the file at [site_root]/admin/index.php. Super no bueno.

I tried restarting the site, stopping the LOCAL VM and restarting, restarting my machine. It is only for one site, all others are loading properly.

Any idea on what’s going on here and how to fix this?

Thanks!

It seems as if PHP isn’t loaded. You might want to try switching webservers between Apache and nginx.

So strange.

Temporarily changing to nginx and then back to Apache solved this. Thanks for the tip.

This is resolved!

1 Like

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.