How to manually change the WordPress address?

I have a wordpress site, I needed to change it’s address. I achieved most of it but then I decided to follow a tutorial which said on the setting make these changes:

WordPress Address (URL): http://example.com/wp
Site Address (URL): http://example.com

That /wp messed everything up. When I try to log in, the form directs me to /wp/wp-login.php

So I can’t go back to the admin section to edit it.

Is there another way?

I tried the following:

In wp-config

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

in functions.php

update_option('siteurl','http://example.com');
update_option('home','http://example.com');

None work

I tired looking within the database but I don’t know where to look

These addresses are in the ‘wp-options’ table of the database. The field names are ‘siteurl’ and ‘home’. They are the first two in the table.

3 Likes

Thanks

That did it.

I have another problem. The images are using the old url. The theme uses woocomerce and the produc images are located at wp_posts and the guid field has the urls to product images.

Here is one example

http://fashion/wp-content/uploads/2013/06/poster_4_up.jpg

I need these to be

http://wFashion/wp-content/uploads/2013/06/poster_4_up.jpg

Is there a quicker way then changing one by one

Edit

These are featured images

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.