最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Copied site has wrong menu URL behaviour

programmeradmin2浏览0评论

I copied working WP site to a new dir for a theme redesign, created a separate db, change all old site urls to the new address. Now when I use menu it goes to the old site location. Rewrite rules are the same. Whats wrong?

I copied working WP site to a new dir for a theme redesign, created a separate db, change all old site urls to the new address. Now when I use menu it goes to the old site location. Rewrite rules are the same. Whats wrong?

Share Improve this question asked Mar 4, 2020 at 19:06 tobtotobto 12 bronze badges 3
  • When you said you changed all old site URLs to the new address, how did you do that? Did you use an SQL query? If so that would explain the issue – Tom J Nowell Commented Mar 4, 2020 at 19:18
  • No. I opened text editor and changed old site name oldsitename for a new dir oldsitename/1 Thx! – tobto Commented Mar 4, 2020 at 19:25
  • Ooh, you have to change things in the database to change a sites URL – Tom J Nowell Commented Mar 4, 2020 at 19:57
Add a comment  | 

1 Answer 1

Reset to default 0

You need to use a Search and Replace plugin (I like "Better Search and Replace") to replace in the database all instances of the olddomain name with the new one. This will fix media links, and anything else that has the olddomain name.

You could do it manually with some SQL queries, and going into the menu area of the new site, but the plugin will be much faster. (Backup your database first, of course. But I've used the above plugin on several sites without problems. )

发布评论

评论列表(0)

  1. 暂无评论