website showing index.html file code

Posted November 29, 2019 2.3k views
ApacheWordPressUbuntu 18.04

Hello Team,

I have done setup of wordpress. My website was running fine from last 2 months. Today I tried to enable SSL lets encrypt certificate. My website stopped to work. I tried to solve this issue but now it is showing the code of index.php file

  • 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( ‘WPUSETHEMES’, true );

/** Loads the WordPress Environment and Template /
require( dirname( FILE ) . ’/wp-blog-header.php’ );

Please help me.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
5 answers

Hello, @Web1developer

I will recommend you you to check our tutorial on how to install LE SSL on Ubuntu Apache server:

Hope this helps, let me know if you have any questions.


by Kathleen Juell
by Erika Heidi
Let's Encrypt is a Certificate Authority (CA) that provides an easy way to obtain and install free TLS/SSL certificates, thereby enabling encrypted HTTPS on web servers. In this tutorial, you will use Certbot to obtain a free SSL certificate for Apache on Ubuntu 18.04 and set up your certificate to renew automatically.

I have done it but it is still giving the same error

Hello, @Web1developer

Can you please let me know if you’ve tried changing your theme and also changing the permalinks type?

Let me know how it goes.


Hello team,

I have replaced the theme and permalinks but I am still facing the same issue. I am also not able to access my admin panel

I hope you have found a solution more than a year later – but I actually ran into the same issue just a moment ago.

In my case I had forgot to enmod the php version I was trying to use.

a2enmod php7.4

Not sure if that’s the same as in your case, but hopefully you or someone else find it helpful.