[HELP] Wordpress: Moving from subdomain to root

creativepotion

Regular Member
Joined
Jun 23, 2012
Messages
305
Reaction score
19
I need some help here guys; went through a couple threads on wordpress forum and didnt find it helpful at all.


I just moved my wordpress blog from subdomain to root
ie: blog.mydomain.com -> mydomain.com


1. I went to Options > General; Changed site and admin URL
2. I copied my files from blog.mydomain.com to mydomain.com


Everything works fine. All page accessible. I thought it was a success until I tried setting permalink on it.


I changed my permalink from (Default) to /%postname%/
Now all my pages arent accessible. All pages experiencing 404 not found issue.


When i change it back to (Default), it works again.


Any idea whats going on? Thanks.
 
Try the following...

If you are using Permalinks, go to the Administration > Settings > Permalinks panel and update your Permalink structure to your .htaccess file, which should be in the same directory as the main index.php file.

http://codex.wordpress.org/Moving_WordPress
 
I did go thru that link before posting for help here. (thanks)

The default directory (old) doesnt even have a .htaccess file.
I created a new .htaccess file accordingly and paste the new codes there. No luck :(
 
1) Do the files still exist in the old structure?

2) Did you use a utility to change all the links in the database to the new structure?

3) Did it give you an error WHEN you saved the permalinks... or right after? Ie. could it not write to the htaccess file?

4) Do you have cpanel? If so, copy all of your files out of the root, install WP from the cpanel to the root. Then copy your files back (except the htaccess). This may reset any damaged permissions.

If you can give me a temporary admin account, I'll take a look at the settings. Something might jump out at me.
 
Creativepotion,

Perhaps your server is not configured to allow symlinks. Try adding the following code to the top of your .htaccess file and see if it fixes the problem.

Options +FollowSymlinks
RewriteEngine on


Hope that helps,

Shawn
 
That's not how you set a installed wordpress site to the root.
1. First step is correct, except do not change the admin url.
2. Copy (yes copy) only your index file from where it is at, usually something like /public_html/wordpress/index.php, to your root.
3. Edit the copied file, the last couple of lines to include the path to your wordpress install, something like this: require('./wordpress/wp-blog-header.php');.
Forgot to add, changing permalinks style can sometimes cause issues with older posts using the different style. You may need to edit them in your SQL database.
 
Last edited:
go to settings->general settings and see if the domain in the settings is set to new one
 
Back
Top