• I moved a copy of my wordpress site to a local WAMP environment to test stuff locally. However, when I access things like the control panel the browser redirects me to the www site instead of the local copy.

    I tried doing a clean install of wordpress, retaining only my old database, but the same thing happens even though I didn’t key in my www url anytime. This makes me conclude that the www address is somewhere in the main sql database.

    Does anyone know how to make the program only point to the local copy, and not go to the online www url at all?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Export the content from your remote site using Tools/Export. Install WP locally with a clean database then import your posts using Tools/Import.

    Thread Starter miwashi

    (@miwashi)

    Thanks.

    The problem is, my remote site is totally gone, that’s why I’m setting up a local copy from scratch, and all I want are the posts.

    I have a sql backup of the remote site before it went down, so how do I extract just the content from the sql database and use that in my local site?

    If you are familiar with phpmysql, you should be able to import the .sql dump file using that. You can make any changes to the dump file itself using a standard text editor such as NotePad++

    Depending on your circumstances, you may need to update the database name in the .sql dump file to your new db name. This is usually towards the top of the file and usually looks something like this:


    — Database: some_database

    If you have any issue restoring the .sql file to your newly installed WP database, try using phpmyadmin to select all of the WP tables and remove the data by choosing the “empty” option. Once the tables are empty, try restoring your .sql dump file back to it.

    There may be a few small tweaks that need to be done to get it just right but this will work to get all your content back in place if you don’t have the ability to use the import/export feature in WP.

    Good Luck!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Moved wordpress to local WAMP but it keeps redirecting to www’ is closed to new replies.