Absolute URL for Wordpress login continues to default to localhost
Posted by: tectao (---.res.bhn.net)
Date: October 18, 2012 04:58AM

I have set up WAMP and have Apache, phpMyAdmin and and MySQL running fine. I've set up a Wordpress site to begin editing on the local server rather than the remote server.

In a browser, I can get to the remote server index.php page, the cpanel but when I try to log in through the www.thissite.com/wp-admin it defaults to localhost.thissite.com/wp-admin.

I have edited the host file in the system32 folder with the IP address for the absolute URL and also the wp-admin directory. I have also cleared ipconfig flush DNS. Still getting the same results.

Any thoughts? Thanks in advance for any help
mike

Options: ReplyQuote
Re: Absolute URL for Wordpress login continues to default to localhost
Posted by: RiggsFolly (---.as13285.net)
Date: October 19, 2012 10:47AM

I assume you have copied a database from localhost to remote.

You cannot just copy the database from local to remote. You need to edit a couple of fields in the database to update wordpress as it stores the address that it was install on in its database, and uses that in page address's

using phpMyAdmin

Edit the wp_options table, there are at least 2 row in that table that contain the localhost address, change that to the real url for the remote wordpress site.
The first 2 are references are basic wordpress requirements, other may exist for widgets etc that you may have installed.


Try this query to find all the references:

SELECT * FROM uks65128.wp_options where option_value like '%localhost%';

Options: ReplyQuote


Sorry, only registered users may post in this forum.