admin管理员组

文章数量:1127699

I am trying to make a website as a task for my university. I used this tutorial: the first time I did it it was fine , but I messed up the website so I decided to purge and do it all over again. But when I try to load the website when I , once again , followed the instructions from the site above, I am greeted by this message :

//<?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 __DIR__ . '/wp-blog-header.php';

it seems to be the index.php file. How do I make the website go up again ?

I am trying to make a website as a task for my university. I used this tutorial: https://ubuntu.com/tutorials/install-and-configure-wordpress#1-overview the first time I did it it was fine , but I messed up the website so I decided to purge and do it all over again. But when I try to load the website when I , once again , followed the instructions from the site above, I am greeted by this message :

//<?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 __DIR__ . '/wp-blog-header.php';

it seems to be the index.php file. How do I make the website go up again ?

Share Improve this question edited Jan 11, 2024 at 17:27 Jacob Peattie 44k10 gold badges49 silver badges62 bronze badges asked Jan 2, 2024 at 17:19 GiannisGiannis 11 bronze badge 1
  • Remove the // from in front of the <?php on the first line. It might not be the only problem but it can't be helping matters. – Pat J Commented Jan 11, 2024 at 17:43
Add a comment  | 

1 Answer 1

Reset to default 0

Make sure php is up and running. Looks like apache is configured to show the website correctly if you are able to see the index.php page. Are you accessing the site using http://localhost or something like that? If so then open your terminal and enter php -v If nothing shows you need to reinstall php.

本文标签: loginindexphp file shown when trying to load wesite