Until two days ago the site was working fine. Yesterday, I've done nothing to it and now when I try to go to the web site it downloads a file that contains:

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

I've already tried changing the name of the plugin and theme directory to see if the problem comes from there but it didn't helped, I've also tried to rename the .htaccess file but it won't regenerate and I've also verified permissions and they are fine.

有帮助吗?

解决方案

Sounds to me like PHP is not running on your system, or (perhaps) an older version of PHP.

But you can check PHP status by creating a simple PHP file with the command

phpinfo();

in it and loading that page in your browser. That should show you the current settings of PHP, if it is running. And perhaps check with your hosting support to see what they say.

There are many googles/bings/ducks about how to ensure PHP is running on your server. I'd start there.

其他提示

The decision to process or download files, as you've described, is often a function of your http server rather than wordpress.

Has your host made any changes to your server configuration? Has PHP been recently upgraded?

Make certain your PHP Handler is configured correctly. Also verify all files associated with Wordpress are present and haven't been removed via malicious software.

A google search yields lots of results, nearly all being an issue with the http server.

Google Search Results

I'd have left this as a comment but I'm so new here I can't leave comments.

许可以下: CC-BY-SA归因
scroll top