• Resolved PN_CS

    (@pn_cs)


    Hello!

    I’ve read every forum post I could find as well as the Moving WordPress codex and several other tutorials about creating a copy of my WordPress site for testing purposes. After trying it multiple times, I’m still getting 404 errors every time I try to access a page other than the index.php page.

    These are the steps I followed:

    1. I downloaded my site files and copied them to the htdocs folder in my Apache installation.
    2. I created a new database.
    3. I exported the database for my live site.
    4. I imported the data from the live site database into the new database.
    5. I changed the wp-config file to access the new database, with the new user name, db name, and password, with localhost as the host.
    6. I used MySQL workbench to change the _options table, setting the option_value column for “home” and “siteurl” to my new url.
    7. For good measure, I also defined WP_HOME and WP_SITEURL in my wp-config.php file to be my new url.
    8. I doubled-checked that Settings-General and Settings-Permalinks showed my new url instead of the old one and hit “Save” a few times.
    9. I used the Velvet Blues plugin to update as well, just to be sure.

    I get 404 errors whenever I access a page other than the home page, and I am unable to view the pages even in preview mode.

    I’ve been working on this for days! Please help : )

    The original website is http://www.pacificnorthern.com. The copy of the site is http://dev01.pacificnorthern.com. They are not on the same server- the live site is hosted with a hosting service, while the test site is hosted on a computer I have remote access to and is only accessible on our company intranet.

    Any help is very much appreciated! Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    http://dev01.pacificnorthern.com/ isn;t working at all for me, so I can’t really check.

    Try re-saving your permalink structure at Settings/Permalinks in your admin panel. If WordPress cannot automatically edit the .htaccess file, it will provide manual instructions after saving.

    If that doesn’t work, contact your hosting provider to make sure that mod_rewrite is installed and active on your server.

    Thread Starter PN_CS

    (@pn_cs)

    Thank you so much for your reply!

    I in fact did not have mod_rewrite loaded in my httpd.conf file. The even bigger problem was that I had AllowOverride set to None for my htdocs directory, so my RewriteRule directives weren’t being applied.

    I feel really silly about overlooking that (I’m pretty green at Apache), but I’m just relieved that the problem is solved.

    Thank you again!

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    You’re welcome!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘404 Errors after copying site and changing wp-config file.’ is closed to new replies.