Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just installed lamp here on my desktop. i am using 12.04. Installation works perfectly but when i tried to access localhost/wordpress/ it doest read the index.php. It shows like this: enter image description here

Why is it happening? why my localhost doesnt read the index.php? I tried to create a dir and put an index.php there but again it shows the whole listing of directory and ignore my index.php. Please help. Thank you

share|improve this question
If you click on the index.php file does it display your wordpress? – Goddard Aug 23 '12 at 6:48
up vote 2 down vote accepted

You need to add a directive to your apache2 configuration or your .htaccess file. Like this...

DirectoryIndex index.php

...otherwise, it just defaults to index.html

Same thing if you wanted index.shtml, you'd need:

DirectoryIndex index.shtml
share|improve this answer
Where is the location on .htaccess file is? – thenewbie Aug 24 '12 at 1:34
Usually below the directory where your .html files are kept. There are directives to set this as well. Some Googling for apache2 configuration will help with this. – fyngyrz Aug 25 '12 at 9:41

changing the public_html folder's/htdocs folder permissions to 755 will solve this problem. I suddenly changed the permissions of my blog and this happened with me. I have searched a lot but in vain. Finally I got it and solved this issue.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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