website showing index.html file code

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 <?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’ ); **

Please help me.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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.

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

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.

Regards, Alex

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

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.

Regards, Alex