Some posts pointing to old url after changing domain

I changed my domain name for my website and I double checked with the migration document on WordPress, everything is as it should be.

Problem:
When permalinks is set to default:
all pages work, expect for a button on homepage which sends me back to the homepage but updates URL.

Read More

For Example: Im on example.com and i press search button>> URL changes to example.com/search but im on the same homepage. I press it again, URL becomes example.com/search/search. Interesting and Frustrating.Pic below explains the URL, when i press the button POST A PROJECT

When permalinks are set to other settings like day, month:
Some pages redirect to old domain. Example: if i click on search on my website , it will take me to oldexample.com/search. when i manually update URL to example.com/search, I can see the page. BTW, oldexample/search gives me nothing.

**New Problem:**Recently, I activated all in one seo and sitemaps dont work with default permalinks.

Example: example.com/sitemap.xml gives me my homepage instead of the sitemap page. When i change the permalinks to other settings, I can see my sitemap.
I mean, what is this??

PS: Its a multisite installation with ONLY 1 SITE. and I had W3 cache, deleted it. problem exists.
PSS: when i submit my sitemap.xml to google with default permalinks, it says its HTML. so i changed permalink to date month and submitted; Successfully.

Related posts

2 comments

  1. Using the “search and replace” script, I updated my links. Uploaded the script to the folder containing wp-admin, wp-include and the likes. Followed the instructions and clicked on dry run.
    I found that my wp-postmeta contained some old urls. Updated just that 1 table and that did the trick.

  2. Use a Search and Replace DB script if you are transferring a wordpress site (along with the database) to another domain.

    The DB contains links from old domain, so you need to replace the old ones with the new ones. Just be careful and make a DB backup just in case.

    This script is a great tool if you are creating a WPMU sites. Just copy the site and to a subdirectory (/en, /de, whatever your name domain is), import the old DB to the new one, and run this script before you’ve entered the site.

    It is crucial not to enter the new site before running the script so that all the old links will be picked up correctly by it. After you’ve replaced it, you’re good to go.

Comments are closed.