Wordpress download file instead of opening in browser

PROBLEM: After updating PHP 5.6 tot 7.2 we got some client with the issue that the browser was downloading a file (index.php) instead of showing the website. The file that was downloaded is a document that reads the following.

SOLUTION: Simply put the .htaccess file in quarantine (_htaccess) Wordpress wil make ad a new and proper .htaccess file according to PHP 7.2

 

<?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__ ) . '/portfolio/wp-blog-header.php' )
    • 2 Utilizadores acharam útil
    Esta resposta foi útil?