1

On my Mac, I modified the VirtualHost:

<VirtualHost *:80>
  DocumentRoot "/Users/me/Documents/github/gps_cms"
 ServerName gps_cms
 </VirtualHost>

That is so I can type gps_cms in URL and invoke the web page on localhost.

However, when I type in:

http://gps_cms/wp-admin

It redirects to my main site:

http://example.com/wp-admin/upgrade.php?_wp_http_referer=%2Fwp-admin%2F

And the content on page is this:

No Update Required

Your WordPress database is already up-to-date!

  • Have you checked your host file on the computer? – Jeremy Jared Jul 19 '12 at 19:38
3

WordPress will try to redirect you to the canonical URL for the site, as set in the database during the initial install. But you can override it in the wp-config.php file by setting the WP_HOME constant:

http://codex.wordpress.org/Editing_wp-config.php#Blog_address_.28URL.29

If WP is installed in a subdirectory, you might also need to set WP_SITEURL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.