After installing wordpress (LAMP on ubantu 18.04) the wordpress not launching

Posted May 15, 2020 1.4k views

I followed all the relevant docs and installed LAMP but the word press wont come up! there was a text index.html page to test the Virtual Host that comes up !! but not the wordpress!!

Anyone knows why?

1 comment
  • I have deleted the index.html ( /var/www/my_domain/index.html ) but still the wordpress not loading .

    The directory structure is /var/www/my_domain
    and /var/www/wordpress
    and /var/www/html

    is that right ? the installation of LAMP and Wordpress went all well but it is not loading !
    /var/www/wordpress# ls
    index.php wp-blog-header.php wp-cron.php wp-mail.php
    license.txt wp-comments-post.php wp-includes wp-settings.php
    readme.html wp-config-sample.php wp-links-opml.php wp-signup.php
    wp-activate.php wp-config.php wp-load.php wp-trackback.php
    wp-admin wp-content wp-login.php xmlrpc.php

    These are the files in the wordpress there is index.php ! What needs to be done ?

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
3 answers

Hi there @cyruscaviani,

You could try deleting the default index.html file from your document root.

For example if you are using the /var/www/html directory then you have to run:

sudo rm /var/www/html/index.html

After that, your WordPress installation should start loading as normal.


  • Hi Bobby,

    Tried that but did not work ! :(

    • now after deleting the Index.html I get this :
      Index of /
      [ICO] Name Last modified Size Description
      Apache/2.4.29 (Ubuntu) Server at Port 80

      • Hi there @cyruscaviani,

        In this case it sounds like that the document root in your apache virtual host needs to be adjusted.

        Can you share your virtual host here?

        Also where did you upload your Wordpress files to?


        • Hi,
          I followed this installation Document. All steps were successful.
          How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 18.04.
          yes installed the word press using this doc. Step 4 – Downloading WordPress is in that document.

          I am new to this, how can I share the Virtual Host ?


Hi @cyruscaviani, what is the full path to the index.html that you’ve removed? Based on your description (removing index.html then seeing a directory listing in your browser instead of the WordPress index.php), it sounds like your domain’s virtualhost may not be correctly configured to point to the directory where you’ve installed Wordpress. You might want to check the Apache virtualhost for this domain (it should be located in /etc/apache2/sites-enabled/) and ensure that the DocumentRoot option is set to the directory where you’ve installed Wordpress.

  • Hi JacobG,

    I checked Virtual host > /etc/apache2/sites-enabled/ The DocumentRoot is pointing to /var/www/my-domain

    The there are 3 folders under /var/www/

    my-domain Wordpress html

    Any idea ?

    • Hi Cyrus,

      Some output you provided earlier implies that your WordPress installation is actually located in /var/www/wordpress, so I recommend changing the DocumentRoot setting in your VirtualHost to match that location (/var/www/wordpress) and see if that works. You’ll also need to restart apache after making a change to ensure that the new DocumentRoot setting is picked up:

      systemctl restart apache2

      Let me know how that goes!

Hi JacobG,

The index.html was test file created to test the virtual host ( following the recommendation on one the installation document) located here > /var/www/My-Domain/index.html. I deleted the Index.html but now it is a blank page index of / … etc.
I did follow this > How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 18.04.
All the section were successfully installed ! All section of the installation were successful and no error!

Many Thanks for the reply