0

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 ?

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
    Jan 11 at 17:43

1 Answer 1

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.

2
  • Thanks for the reply! php is running, I got the message : PHP 7.0.33-0+deb9u12 (cli) (built: Oct 26 2021 17:51:39) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.33-0+deb9u12, Copyright (c) 1999-2017, by Zend Technologies. Yes I am running it through http://(ip of the server)
    – Giannis
    Jan 3 at 15:31
  • php -v will tell you if PHP is installed, but it won't tell you if your webserver (apache, nginx, or something else) is using PHP to interpret PHP files. You'll need to check with your hosting provider about this.
    – Pat J
    Jan 11 at 17:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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