Server Fault is a question and answer site for system and network administrators. 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 recently shifted my site to another host. I uploaded both the wordpress folder and the database. But still the home page is not loading when I enter the website name. If I directly try to access an article through a link, i'm getting 404 error. What should I do?

share|improve this question
If the webserver is IIS, also sounds like directory listing is enabled. I typically disable it for security purposes. – Dustin Dec 28 '11 at 14:56

It is likely that your site's index page (index.php) isn't configured as one of the default index pages for a website on the host's server. If you are on a Linux server, you can solve this by creating/modifying a .htaccess file in your home directory (in cPanel and AFAIK DirectAdmin, this is called public_html, in H-Sphere this is the folder with your domain name), and adding the line:

DirectoryIndex index.php

If you are hosted on a Windows server, then this is done through your web hosting control panel (e.g. Helm, H-Sphere, Plesk, WebsitePanel), or if you have access to the server directly, in your web site's properties in IIS Manager it's under Documents.

In addition, reading the second part of your question again, I believe that you might not have copied the .htaccess file from the previous WordPress installation, or indeed you transferred form a Linux to a Windows server. In order to copy your .htaccess file from the previous host, make sure that when you connect to FTP you are displaying hidden files (in FileZilla for example, this is done through Server > Force showing hidden files).

If you indeed transferred to a Windows server, then ask your new host if they have ISAPI Rewrite 3 installed, because that might work with your existing .htaccess file. Otherwise you will need to reconfigure WordPress (can be done directly through PHPMyAdmin if you don't have access to it, but that's another topic).

P.S. If you provide the URL for your website, we might be able to help more.

share|improve this answer

If you are using a shared hosting on Linux then .htaccess can solve your issue. You should contact you service provider since index.php is usually served by default. Also ensure that you are not uploading wordpress files to your home folder. You need to upload it to your webroot or document root which is sometimes named as public_html.

If you are using a VPS or dedicated box then ensure that php process is running. This does not looks like a db error to me.

share|improve this answer

First of all you have to check wether your webserver is configured correctly or not. Means you have to a.) check what Ynhockey wrote, you have b.) to check if you have an accurate <Directory>-container with all required directives and c.) Wordpress has some settings stored in MySQL. AFAIK there are some absolute path settings as well which you should modify using the MySQL editor of your choice. If you changed the domain as well, you should edit those values as well.

Last not least, if you can access the backend of your Wordpress installation, go to the Settings > Permalinks and set the common options to default. After that you must check that your mod_rewrite is up and running correctly within your context. This should fix the 404.

If you need further assistance, leave a comment and maybe your configuration (apache.conf, ofc)

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.