Change WordPress base directory
-
I realized too late that I posted in a topic already marked as “resolved” so it was unlikely that people were to read it.
I host my site in my home directory on a machine (over which I have no Apache2 control, so I can’t just subdomain it or something like that). Anyway, what I have now is this:
Hosting site: http://www.foo.com/username/blog
blog.bar.com is currently redirected to http://www.foo.com/username/blog
All fun and good, right? Except all links in WP are of the form http://www.foo.com/username/blog. So I changed the site url in the WP settings to blog.bar.com, under the assumption that across the site the urls would change (except for posts, which have their urls set permanently.
Now, whenever I go to blog.bar.com, it goes to blog.bar.com/username/blog/username/blog.
I already know that I have to substitute in manually the site url in the posts table in the database (which is silly: why manually attach urls to posts as opposed to putting relative paths in the database and prefixing with the site url?). My only current issue is to figure out why WP is sticking in an extra set of directories in the url.
How can I fix this?
The topic ‘Change WordPress base directory’ is closed to new replies.