Today I wanted to change my wordpress url. I register the domain from another provider, not from my own host.
This morning, I got an mail from the registrar saying that the url now points to my webspace.
What I then did:
1) I changed the domain name under Settings > General for "WordPress Address (URL)" and "Site Address (URL)" to the new domain.
2) Searched and replaced the old URL in the database with the new one.
3) I updated my permalinks: Settings > Permalinks
With the default permalinks (IDs) the page works fine. But when I set the permalink settings to "post name" I only get 404s.
I have my wordpress page on an apache server. Htaccess and mod_rewrite are enabled.
Wordpress can update the .htaccess file: so when I change it in the backend, it writes the rules into the .htaccess file.
I created a new blank database to make sure, the 404's don't result from incorrect database entries from the absolute links, and I have the same issues with the new DB.
What can I do now? I'd appreciate any advice.
----- UPDATE ---------
Some details what works and what doesn't:
.htaccess works fine without newurl.com
oldurl.com/?p=123
becomes
oldurl.com/sample-post
even this already works if you type it manually into the browser window:
newurl.com/sample-post
newurl.com works fine without .htaccess
If I set the Site Adress (Admin Panel > Settings > General) to newurl.com, the page also works, but only with the default permalinks. It keeps newurl.com as base-url and doesn't jump back to the oldurl.com. But when I add rewrite rules to my htaccess for nice names I get 404's.
So , these settings already work:
1)
- WordPress Address (URL) : oldurl.com
- Site Address (URL) : oldurl.com
- Permalink: Post name
2)
- WordPress Address (URL) : oldurl.com
- Site Address (URL) : newurl.com
- Permalink: default
The problem in my case is, that the domain and my wordpress installation are on two seperare servers.
A similar setup may be the subfolder setup, where you have to put a copy of the index.php and a .htaccess in the root folder.
http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory
I don't know if that also works in my my case.
It seems that the .htaccess gets activated after the proxy and then it's already too late and it results in 404's. So a solution could be to put it a .htaccess and a index.php on the domain server.
Is that possible?