Toskan
Toskan

Reputation: 14941

Wordpress deployed to host server, but the page still tries to access localhost URLs

So I developped everything locally.

When I uploaded it to the actuall hostserver under http://lukasmeier.someurl.ch I still get calls to localhost.

Which setting do I have to manipulate?

I added to wp-config.php

define('WP_HOME','http://lukasmeier.example.com/demoapps');

define('WP_SITEURL','http://lukasmeier.example.com/demoapps');

enter image description here

Upvotes: 0

Views: 54

Answers (3)

Predrag Beocanin
Predrag Beocanin

Reputation: 1400

Regardless of changing config, wordpress stores this in options. In it's mysql database, you'll find a table called wp_options and there's column option_name called siteurl.

Source & more info here.

Upvotes: 0

enguerranws
enguerranws

Reputation: 8233

Wordpress stocks URL information in the DB, be sure to proceed to Search and replace on a dump of your current DB and replace the URLs (ex: http://localhost.com/site > http://www.site.com DON'T INCLUDE THE LAST SLASH ) , then reupload the dump on your server.

OR

Here's a PHP script that do the job : https://github.com/interconnectit/Search-Replace-DB

I use that two ways, it works fine.

Edit:

  • go to your admin, Appearance > Menus and save it (if you have one)
  • regenerate the permalinks

Upvotes: 1

versvs
versvs

Reputation: 643

You need to update two values in the wp_options table of your database.

I think that the values correspond to Base url and Home url, but most probably you will find them if you filter the table for localhost as this string is probably in there ;)

Upvotes: 0

Related Questions