Social Question

jazzjeppe's avatar

How can I change domain for my blog?

Asked by jazzjeppe (2598points) February 18th, 2010

I am using Wordpress, self-hosted, and unfortunately I installed in in myblog.com/blog/. Is there a way I can redirect it to myblog.com within WP or in my DNS settings? I’ve tried the DNS redirecting but it won’t let me redirect from a subdomain.

Observing members: 0 Composing members: 0

4 Answers

jrpowell's avatar

Couldn’t you just reinstall it in the right directory? You could back-up the database and upload the back-up after you install.

jazzjeppe's avatar

I guess I could, but it seems so complicated and I just wish there was an easier way

jrpowell's avatar

You could try just copying all your files up one directory. All the database info is in wp-config.php and will work in a different directory.

It should work, but it might not. I don’t really want to test it right now.

adambate's avatar

This can be changed within the Settings Tab in the admin area. Under “General” heading in Settings, you can change the “Blog address (URL)” to the desired URL, ie. myblog.com/ instead of myblog.com/blog/

You may need to edit the .htaccess file if it does not have access to write to it (it will tell you exactly what to put in it).

Also, you may need to copy the index.php file from your /blog/ directory to the main root directory and edit line 17:

change:
require(’./wp-blog-header.php’);
to:
require(’./blog/wp-blog-header.php’);

Where “blog” is the name of the directory if different.

This way you can store your Wordpress files in a specific directory, yet still have the URL set to the root of your site.

Hope this helps.

Answer this question

Login

or

Join

to answer.
Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther