WordPress redirect not working

WordPress redirects not working on new domain?

Here’s a real simple solution for a not so obvious problem – redirects not working in WordPress after migrating a site to a new domain.

The not so obvious part of this problem comes from the way that WordPress dynamically creates content and the permalinks that contain that content – if you look on your server you wont see the directories that match the URLs for your site. So if you have a page with the URL example.com/contact/ you won’t find a contact directory in your public_html root directory. You can’t see it and nor can the server when it is trying to redirect from that directory to the new URL ie example.com.au/contact/ so the redirect fails.

How do you fix it? Really simply you can just create an empty contact directory in your root and the server will redirect to the new page.

WordPress redirect not working