admin管理员组

文章数量:1410712

I have a network installed on my wordpress with 4 websites

  • domain --> Old website
  • domain/fr --> New website in French
  • domain/en --> new website in english
  • domain/es --> New website in spanish

Instead of copy/pasting the contents of the new FR website onto the old website, i'd rather change the "main site" of my network and show everyone that goes to domain the new FR website.

2 options:

  • Either I redirect everyone to domain/fr. I've searched for ways to do that but I did not manage to implement any of the solutions. Some speak of creating a php file, uploading the plugin on the FTP, activating it and voila... but no luck.

  • I change the main site in the wp-config file and the old website on my domain becomes domain/oldFR and the new FR website becomes domain.

    define('DOMAIN_CURRENT_SITE', 'domain');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    

This second option seems a lot better to me. But i can't get it to work. I'm not sure what to change in the wp-config file nor am i sure if that is the only thing to do or if anything is required.

Do you guys have any idea ?

Thanks in advance for the help

I have a network installed on my wordpress with 4 websites

  • domain --> Old website
  • domain/fr --> New website in French
  • domain/en --> new website in english
  • domain/es --> New website in spanish

Instead of copy/pasting the contents of the new FR website onto the old website, i'd rather change the "main site" of my network and show everyone that goes to domain the new FR website.

2 options:

  • Either I redirect everyone to domain/fr. I've searched for ways to do that but I did not manage to implement any of the solutions. Some speak of creating a php file, uploading the plugin on the FTP, activating it and voila... but no luck.

  • I change the main site in the wp-config file and the old website on my domain becomes domain/oldFR and the new FR website becomes domain.

    define('DOMAIN_CURRENT_SITE', 'domain');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    

This second option seems a lot better to me. But i can't get it to work. I'm not sure what to change in the wp-config file nor am i sure if that is the only thing to do or if anything is required.

Do you guys have any idea ?

Thanks in advance for the help

Share Improve this question asked Jun 3, 2015 at 22:12 EdouardFEdouardF 411 silver badge5 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

Ok I actually ended up finding an answer by myself :D

Check out this blog post: http://halfelf/2014/switching-main-blog-multisite/

本文标签: wp configMultisite with pathhow to change the main site