0

I have a multisite and there are 3 blogs. (let's say blog1, blog2, blog3)

First question, How can I change the order of blogs? as you may know, blog1 is the main. I want to make blog2 should be the main. I don't feel good to do 301 redirect. I want to change all of them such as files, database.

Second question, I need to move blog2 to another hosting and blog2 will be the 1st blog. then all of database name need to change like wp-post2 should be wp-post... etc data files should be also change some part. I think modify files are not a big deal for me. I tested to change database table names manually (wp-post2 to wp-post). it seems to be working fine but I believe this is not good way to do.

is there any plugin for both of them? or if I do manually how/what I should do?

Thanks, :)

1 Answer 1

1

If you open up your wp-config.php file for your multisite set-up there are some constants you can change...

define('DOMAIN_CURRENT_SITE', 'example.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);

define('BLOG_ID_CURRENT_SITE', 1);

1 in this case refers to the ID of the site that should be the default site. You can figure out the ID of each site by going to your Network Admin -> Sites. Click to edit any one of your sites and check the URL. It will look something like this http://example.com/wp-admin/network/site-info.php?id=3

id=3 tells you the site id is 3.

I'm not sure why you might want to reorder them. Here's an example of redordering sites in the 'My Sites' admin bar drop down -> http://wordpress.org/plugins/reorder-my-sites/ It will at least give you an idea of how to reorder the sites.

If you want to really reorder them you can go into your database and edit the wp_blogs table. Adjust the blog_id column. For each value you change remember to make the same change to the blogs.dir directory for static files (blogs.dir/1/files/... should become blogs.dir/2/files... if you change site ID 1 to site ID 2).

You'll also need to change the table names and there is an option in the options table called 'wp_1_user_roles' so you'll need to change the 1 to whatever new site ID you set.

You're moving one of your sites out of multisite and into it's own WordPress instance? You can probably just do an export of the content and reimport it into the new site, move over your media files and be good to go then.

2
  • Thanks so much.. why I want to reorder my site is .. we have an instro-site for whole multi-site. but we do not need it anymore. therefore the 2nd page has to be showing at first.
    – pulla
    Aug 11, 2013 at 6:03
  • I will try to change the name of wp tables. I will make sure what you told me. As I told you, we have 4 blogs on a multi-sites. one of them will have its own domain and move to new server. therefore I need to know how to move all of them. I have tried to export but images doesn't go with it. and users information as well. only contents. We have contents from users. therefore, they have to go together such as user id, post id... Any tips?
    – pulla
    Aug 11, 2013 at 6:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.