I went through the Wordpress installation process and I'm getting the Apache2 Ubuntu Default Page when I go to my ip. What did I do wrong?

Wordpress is installed in /var/www/html. My URL is dancer.ly and my IP is Thanks!

  • 4
    To Give a clear answer, Please add these details: Path where Wordpress was installed, URL you accessed. Jun 20, 2016 at 3:55
  • It's installed in /var/www/html. My URL is dancer.ly and my IP is Thanks!
    – Emily
    Jun 20, 2016 at 5:49

3 Answers 3


You are most likely installing WordPress under the wrong path. You have the following options:

Move the files: Copy all the WordPress files from where ever you installed it to /var/www/html.

Change the path used by apache: change the DocumentRoot in the file /etc/apache2/sites-available/000-default.conf to the path where you installed WordPress.

Create a new vHost: Create a new vHost, by adding another site. Copy the /etc/apache2/sites-available/000-default.conf to something like /etc/apache2/sites-available/wordpress.conf and edit it to make your changes. You can than either use a ServerName, to access the server through an URL (for example by adding it to your /etc/hosts file), or disable the default host with a2dissite 000-default. Than you need to enable your new site with a2ensite wordpress (Change wordpress to whatever you named the conf file).

When you change the path or create a new vHost you need to restart apache: /etc/init.d/apache2 restart.


Maybe you also left the index.html in the directory /var/www/html when installing WordPress. Apache searches for the index.html before it searches for the index.php. So you should simply delete it

  • Hmm, I made sure that the Wordpress files are installed under /var/www/html/. In Libre Office, I can only open 000-default.conf as a read-only and it won't save in any other text edit program. Should I try the "Create a new vHost"? Thanks!
    – Emily
    Jun 20, 2016 at 6:04
  • @Emily and what about the index.html? Jun 20, 2016 at 6:05
  • Deleted. I only have index.php in the foldwer
    – Emily
    Jun 20, 2016 at 6:06
  • Now my local IP ( is showing "Error establishing a database connection" and my other one ( is still showing the Apache default page. My domain (dancer.ly) is showing "This webpage is not available".
    – Emily
    Jun 20, 2016 at 6:11

I just had the same problem as the OP. What solved it for me was clearing my browser's cache actually. I even deleted the index.html file from any directory including and under /var/www/html, and it still showed up in my browser when I navigated to my server's IP.

  • Oh I didn't know about that function. Either way, I wasn't posing a question of my own- I was offering a solution to the OP's problem.
    – Willman
    Nov 7, 2017 at 16:00

That is due to multiple index files, like index.html and index.php. All you need to do is to delete the index.html page in the /var/www/html folder, clear cache and reload the page, it should fix the issue.

  • Is that due to multiple index files, like index.html and index.php et cetera? Adding this to the answer would make it from ok(if it works) to good.
    – Dr_Bunsen
    Jun 21, 2019 at 12:51
  • Yes, you are right it is because of that. Adding it. Thanks
    – Sarfraz
    Jun 24, 2019 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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