1

Recently I uploaded a WordPress site, but the page url still displays the old test site url, and the place where my new url is displaying doesnt get the page.

  • Can you share some more information about what exactly you are trying to achieve and also what you have tried currently so we can better help you. – Alex Baulch Aug 16 '16 at 11:54
  • my live site url is www.example.com and it shows index page of my website, now when i click to menus it redirect to demo.example.com – Mayuri Srijani Aug 16 '16 at 12:01
  • Did my answer resolve your question? If so, please upvote it and click the green checkmark to let the community know. Thanks. – Ethan Jinks O'Sullivan Aug 22 '16 at 17:42
0

It's a very common issue when migrating to a different domain. Try one of the two options:

1. Backend: execute a SQL query

Go into your database (phpMyAdmin) and execute the following SQL query:

UPDATE wp_options SET option_value = replace(option_value, 'OLD_URL', 'NEW_URL') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'OLD_URL','NEW_URL');
UPDATE wp_posts SET post_content = replace(post_content, 'OLD_URL', 'NEW_URL');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'OLD_URL','NEW_URL');
  • OLD_URL will be replaced with http://demo.example.com
  • NEW_URL will be replaced with http://www.example.com

This will cover the siteurl, home, and all of your content on your website that is linking to the old URL.

2. Frontend: use the Search & Replace plugin

A more user-friendly approach is to use the Search & Replace plugin to easily replace all tables that contain your old URL. The process is easy to use and you can preview what tables and rows will be affected before applying those changes.

Forewarning

Before applying any changes, I think it goes without saying to always make a backup of your database in the event something goes wrong.

|improve this answer|||||
0

It sounds to me like it's an issue with the siteurl or home which are set in the wp_options table. I would suggest you follow the steps set out in this article to update the URL of the site.

https://codex.wordpress.org/Changing_The_Site_URL

|improve this answer|||||

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.