Getting 404 Not Found Error on every page except index.php

It sounds like a behavior which can happen if you do not have the ".htaccess" file by Magento or if the ".htaccess" file is messed up.

Please try adding or replacing the current file with the default ".htaccess" file from Magento.


For the temporary solution I would suggest you the following step to perform

  1. Go to System ->Configuration

  2. On left hand side select General -> Web and under that you will find the Search Engines Optimization tab

    Use Web Server Rewrites => No

I think your server does not having rewrite_module enable please check whether it is enabled or not. Also check that your root directory containing the .htaccess file or not. You still have any problem just contact me on my skype:imrhjadeja. I will provide you more detail


This most likely is a file ownership issue. You probably upload the Magento files as another user and the web server user can't access the files. You have to change ownership so the webserver user owns the files.

First, you need to find out what user your webserver runs under. If your running Ubuntu, it's usually www-data. In that case, you simply go to your root directory at doing the following.

chown -R www-data:www-data magento
  • chown is the change ownership command. -R means it recurses everything under the root folder. In this case, I assume Magento is the name of your directory.

Once you do that be sure to set permissions.

find . -type f -exec chmod 400 {} \;
find . -type d -exec chmod 500 {} \; 
find var/ -type f -exec chmod 600 {} \; 
find media/ -type f -exec chmod 600 {} \;
find var/ -type d -exec chmod 700 {} \; 
find media/ -type d -exec chmod 700 {} \;
chmod 700 includes
chmod 600 includes/config.php

Here is the current link with more details.

NOTE: Pay VERY close attention when reading through that link. You got to add a backslash at the end of the file commands before the semicolons.