WordPress Gets 404 Not Found Error When Entering Address

I ran into a 404 not found error when trying to access a local WordPress installation.
I am migrating a working WordPress installation from my hosting account where I set up the WordPress site. After downloading all the files into the WWW folder of my WAMP installation, I imported the SQL file from the server and imported this file to recreate the WordPress database on my local machine.

Once completed, I tried to access the WordPress installation by typing (((http:)))//localhost:8080/wordpress1/. I got a 404 not found error and the address at the top of my browser changed to localhost/wordpress1/. I used parenthesis to stop this editor from making the address a link

Read More

My Wp-config.php settings are:
define(‘DB_NAME’, ‘wrd_okm5cj2a6c’);

/** MySQL database username */
define(‘DB_USER’, ‘root’);

/** MySQL database password */
define(‘DB_PASSWORD’, ”);

/** MySQL hostname */
define(‘DB_HOST’, ‘localhost’);

My httpd.conf setting is:
Listen 8080

When I download a copy of WordPress from the WordPress site, it works fine.
Do you have any idea what could be wrong?

Ken

Related posts

Leave a Reply

2 comments

  1. a.) You need to add in another 2 lines in wp-config.php:

       define('WP_HOME','http://localhost/wordpress');
       define('WP_SITEURL','http://localhost/wordpress');
    

    b.) Take a look at this-> A good tutorial: http://www.maketecheasier.com/clone-your-live-wordpress-blog-to-a-local-server/2010/06/04

    c.) If above one not work? Are using theme in your wordpress site.
    If so, delete all wordpress files in www folder and do like this.

    1. Install wordpress like this in this tutorial

      http://sixrevisions.com/web-development/install-wordpress-on-your-computer-using-wampserver/

    2. Install your theme alone in your localhost wordpress login.

    3. In your hosting account site, export all your posts
      Tutorial-> http://codex.wordpress.org/Tools_Export_SubPanel

    4. Go to your localhost import all using wordpress import in tools section. You should activate wordpress importer plugin.

    5. If you have images in your hosting wordpress site, you should download wp-uploads as zip in your hosting cpanel and extract that to localhost wordpress wp-uploads folder.

  2. When migrating from one host to another, you have to change the following two settings in the wp_options table either via phpmyadmin or equivalent tool, or even via sql commands. The entries to modify are listed by option_name:

    • siteurl
    • home

    So for my MAMP install, I have:

    option_name    option_value
    siteurl        http://localhost:8888/my_dir
    home           http://localhost:8888/my_dir
    

    You will need to substitute your port number where I have “:8888”.

    So now here is the kicker. If you attempt to connect to your local site BEFORE changing the entry, wordpress will send you a 301 redirect (permanent) and your browser will cache that. You have to clear your cache to reset this. (refresh will not work). Depending on your browser, you might have to flush the cache and close and re-open the browser. (See: How long do browsers cache HTTP 301s?)

    A mysql update would be similar to:
    update wp_options set option_value = 'http://mydomain:1234/my_dir'
    where option_name = 'siteurl' OR
    option_name = 'home';

    where:

    • mydomain is your domainname,
    • my_dir is the directory of your wordpress,
    • 1234 is your port