0

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?

1
  • If the webserver is IIS, also sounds like directory listing is enabled. I typically disable it for security purposes.
    – Dustin
    Dec 28, 2011 at 14:56

3 Answers 3

1

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.

0
0

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.

0

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)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .