Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Copa WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Como ativar a opção de vários sites no WordPress 3.0

O WordPress 3.0 é o momento em que ocorre a grande fusão. O núcleo do WPMU é incorporado ao WordPress, o que significa que agora é possível executar vários blogs em uma única instalação do WordPress. Esse novo recurso está sendo chamado de opção de rede ou de vários sites. Por padrão, esse recurso está desativado. Se quiser usar essa opção em seu WordPress, será necessário ativá-la.

Para ativar esse recurso, basta abrir o arquivo wp-config.php localizado na pasta raiz do WordPress. Em seguida, adicione a seguinte linha em qualquer lugar do arquivo:

define('WP_ALLOW_MULTISITE', true);

Depois de fazer isso, você poderá acessar a página de rede em Ferramentas ” Rede

WordPress Multi-site Option

Agora, você não precisa mais instalar várias cópias do WordPress porque pode executar vários blogs em uma única instalação. Por padrão, você só tem permissão para executar outros blogs como um subdomínio. Para usar outros domínios para blogs, você pode usar um plugin de mapeamento de domínio.

Divulgação: Nosso conteúdo é apoiado pelo leitor. Isso significa que, se você clicar em alguns de nossos links, poderemos receber uma comissão. Veja como o WPBeginner é financiado, por que isso é importante e como você pode nos apoiar. Aqui está nosso processo editorial.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

O kit de ferramentas definitivo WordPress

Obtenha acesso GRATUITO ao nosso kit de ferramentas - uma coleção de produtos e recursos relacionados ao WordPress que todo profissional deve ter!

Reader Interactions

92 ComentáriosDeixe uma resposta

  1. mohadese esmaeeli

    Hello! Is it better to have a WordPress network, or should we use the subdomains and subdirectories feature to launch side websites?
    In a WordPress network, the database is unified, and this may lead to crashes or database heaviness. What is your opinion? Which one is better?

    • WPBeginner Support

      It would heavily depend on your specific use case for what would be best to use. If you are concerned about your database size then you would want to create individual sub-sites so each has their own database.

      Administrador

  2. Sean

    Worked like a charm! So ideal for a localhost environment in development of themes and plugins.

  3. Wayne Curran

    Thanks for this info about enabling multi site.

    I have a problem though. I can’t install or upgrade anything. It keeps asking for ftp details. My wordpress is running on a synology NAS.

    • WPBeginner Support

      @Wayne this problem usually occurs when WordPress is unable to write files on the server. It happens when PHP is running under mod_php or CGI as the user instead of the user that owns WordPress files. You can ask your hosting provider for support. Meanwhile you can also add your FTP credentials in wp-config.php file so that you don’t have to enter them each time.

      define( 'FTP_USER', 'username' );
      define( 'FTP_PASS', 'password' );
      define( 'FTP_HOST', 'ftp.example.org:21' );

      Administrador

      • Wayne Curran

        Thanks for the reply.

        I think I need to add some more info.

        I installed wordpress on my Synology NAS via the package installer, so it’s installed locally on my NAS at home. The site isn’t hosted externally at all. Completely local. (it can be accessed from the web via a synology domain name)

        I’m currently only experimenting with building my sites. I need 3 sites hence why I need the multisite option. Without this option, I’m unable to experiment with all my sites. I can only play with one at a time.

        Anyhow, I should have also added initally that when I enter the ftp login details, they don’t work. I’ve racked my brains to try and work out what ftp details it could be after but none of them work.

        Are then specific login details for as you mentioned ‘mod_php or CGI’. I don’t even know what that means :-)

        • Wayne Curran

          Update!!

          I’ve reinstalled from scratch. All working ok now.

          But, a new question.

          In the general settings, 2 fields are missing. Wordpress address and site address.

          Any thoughts?

  4. Grant

    Where do I find the wp-config.php folder?

    • WPBeginner Support

      Grant wp-config.php is a file not a folder. You might find it in your website’s root folder. To access it connect to your website using an FTP client like Filezilla.

      Administrador

  5. Nimitz

    Hi, it is possible that users has a blog on my wpmu then they can have their own domain name? same like on wordpress.com that any blog can upgrade to their own domain name?

  6. Alexander

    Would you provide a step by step guide for creating a multi-site setup on local machine using Xampp on Windows 8.

  7. Yevgen

    It seems that Domain Mapping plugin is unsupported anymore. Are there any alternatives? Is it possible to setup domains manually using functions.php?

    Thanks.

  8. TerdpongMongsonti

    thank you for useful information that save my time!!

  9. LiliaLee

    Great post, thank you!!!!

  10. mattsfraser

    Thanks for this tutorial as I was wondering how to install WP MS and your article greatly assisted me in doing so. Much appreciated.

  11. ggarvin

    I love the guide but I have run into a problem. I used your code and see the network option but I get the following message. <blockquote>”Error: Your WordPress address must match your Site address before creating a Network. See General Settings.”</blockquote>

    Is this because my wordpress folder is in a folder?

  12. kvaud

    good afternoon,

    I am setting up a wpms and am attempting to set up a subdirectory with Geo sites. When I attempt certain names – I get the rejected saying is an invalid name or path. Is there a limit on the number of characters in the secondary name?

    thanks

  13. PushpendraPal

    Thanks for full featured post on setting up WP-MS.Going to set it up on my new website.

  14. daniel-dwv

    It installed fine… now what? I can’t find where to edit my new blog.

  15. snelborn

    i wnat to run WPMU on wamp can it work

  16. navj

    Thats great, I just got to know that this facility is also available.

    Cheers wpbeginner

  17. Aneeza Mubbashir

    Thanks for a useful post – I take it we still have to edit the wp-config file to activate the MU features for WordPress 3.1 as well?

    Do all plugins that work on single WP installations also work for multisite?

    • Editorial Staff

      Yes, you would still have to edit the wp-config file to enable Multi-site. All well-coded plugins will work.

      Administrador

  18. Mistry

    Thanks for a useful post – I take it we still have to edit the wp-config file to activate the MU features for WordPress 3.1 as well?

    Do all plugins that work on single WP installations also work for multisite?

  19. Noor Mustafa

    When I try to add this “define(‘WP_ALLOW_MULTISITE’, true);”
    It create conflict with Google XML Sitemaps.. Getting this error msg”Google XML Sitemaps is not multisite compatible.”
    Any help really appreciates ….

  20. César Pérez

    Hi everyone. First time in this site.
    I’m really interested in WP MS function but I’m not pretty sure if this is what I (we) need.

    I’m the webmaster of a university’s website and I wanted to install multiple WP in different sub-domains (like medios.uagricultura.com, biologia.uagricultura.com, escolar.uagricultura.com). Now, thanks to you, I find it may be possible to make a single WP installation and part from there but I need to have the main account of the installs plus one more guy/girl to administrate each sub-domain on its own and separate from the others ones. I mean, I need to administrate everything on demand but each section must have it’s own administrator/theme/active-widgets.

    Would you recommend me to make a single WP MS installation or to keep one WP per sub-domain?

    I’m a little old in WP knowledge but brand new in the administration side of it. Thank you in advance.

    • Editorial Staff

      The Multi-Site option is what you need. You can be the network admin, and you can have one guy or girl managing each specific subdomain. Each section will have it’s own admin panel.

      Administrador

      • César Pérez

        Thank you so much for the quick reply. I’ll be working on this all the week. By the way. Love your site. I’ll be here for a long, long time.

        Kudos!

  21. Bunty Singh

    Thanks for Sharing this very important article for create WordPress Multisite.

  22. Philip Bateman

    Greetings – please excuse my basic question but does multisite work using different themes and entire domains? eg a http://www.xx.tv and a http://www.xx.com.au, accessed through the one administration section, where I can have a different look / theme for each domain?

    I’ve always used godaddy so far for 1-click wordpress setup and hosting but am at a point where I need to setup 3 sites that each have a different theme and domain but ideally share content amongst them.

    Would multi-site facilitate this or will I be recreating content / blog posts / pages in each ‘instance’ ? Thank you kindly for the information. I <3 WP :D

    • Editorial Staff

      Yes Multi-Site allow you to use Domain Mapping (which lets you have two separate domains, two separate themes, two separate plugins etc). Godaddy is not the best host for this. Try using HostGator (coupon: wpbeginner).

      Administrador

      • Rick Nielsen

        Philip,
        The staff here is right on. I have completed 3 Multisite installs on my HostGator hosting and it works great. GoDaddy is not the best place to host, in my opinion, much of anything. Have fun with Multisite!

  23. Jon

    Drupal is worth a look too, maybe not a intuitive as Wordpress, and not so well supported, but good all the same. Wordpress does subdomains well though, if you can set up wildcards on your server (I think). I set up a WPMU once on a cpanel hosted site with no problems.

  24. Jon

    Edward, if you are running Wordpress on your own domain you are always in control. If you invest in Wordpress, then the worse case scenario is that the Wordpress community stop supporting it and you software stop being updated.

    But if it works for you now, it will work in the future. Ok, there may be potential security threats raised in the future, but all you need is a sound backup plan and maybe a php developer to work on Wordpress for you. You site is independent of any core files on wordpress.org.

    But in all honesty, Wordpress is probably one of the most durable CMS’ out there. So many people use it, it will always be supported.

    • Edward

      Thank you Jon, now i can assure you i will have good sleep today. Iam really wondering why i never discoverred wordpress before. php code has eaten almost all my brain cells for the last one year! and never never came 10% near what wordpress has done for me in three days! you guys out there keep up the good work.

  25. Edward

    Thank again. one more thing. how would you rate the security and reliability of running hundreds of subdomains on wordpress platform. since it seems wordpress has quite control on the programme. could wordpress one day decide to call it a day and ground all networks including my personal domain running hundreds of subdomains? in other words how independent is my network from wordpress?

  26. sam

    Thanks for Sharing this very important article for create Wordpress Multisite.I followed all steps for Wordpress Multisite and i created on my own domain name.

    Once again Thanks.

  27. Edward

    Am thankful for this blog. is it legal to create say 1000 blogs using wp with this technology and charge a little for maintenace and administrative work? is it possible to run ads from the main installation and they appear in all the blogs? or post announcements that appear in all blogs on my network? for instance can i place adsence ads that run on all blogs from one installation

  28. todd

    thanks so much for this …. really great tutorial.

    i do have one question – is it possible to set up the sites so they have different languages? It would be great if the user could login once and blog across sites in multiple languages. i’ve previously been using multiple wordpress installs to do this which is not ideal.

  29. Glenn

    I did this to one of my new websites, and it worked wonderfully. However, I want to do this to my blog, and I want the (sub-directory) feature. But it says this when I try:

    “Because your install is not new, the sites in your WordPress network must use sub-domains. The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.”

    Do you know how I would be able to do a “sub-directory” rather than a sub-domain?

  30. neil

    Thank you, man. Worked like a charm.

    I have one question. If I have MS working, do I need BuddyPress, too?

  31. JJ

    Hi,

    Many thanks for the tips. These proved very valuable.

    I had 3 websites and Worpress installed in each of the 3 folders. I have now enabled the multi-site and made 2 of the domains “hang under” the main domain.

    My question: what happens to the WP installation in those 2 subfolders?

    Will their version number hang at say 3.0 whilst the main folder gets updated to 3.1, 3.2 etc.

    Is there not a security risk and unnecessary use of webspace ?

    Many thanks for clarifying.

  32. Ckubs

    It may be soud a little bit crazy but with Wp MS it is possible to show below an post comments from same post published on a different website? I want a mobile site but with only one category of it to be the normal site.

  33. Tiffany

    Hi! I got WP3 and multi user installed. Everything seems to be in working order. I’m a WP beginner and my objective for this new site is to have 3 blogs to go along with my Home, Shop, About and Contact pages. Blog #1 will be main blog, Blog #2 will be a wine diary, Blog #3 will be ideas on ideas to recycle wine bottles. I will have a menu to go to all 7 of these pages (all on the same website). I’m building the theme for this site in Artisteer. I’m trying to figure out how to actually use this Multi Site feature in order to make this happen. Will it even work for what I’m trying to do? If you have any links or tips on how to use it (multi-sites) once it’s installed that would be great too!! I appreciate your time and effort! Thank you!

    • Editorial Staff

      Multi Site will surely work. WordPress Codex has an article on how to deal WPMU.

      Administrador

  34. Matt Williamson

    Anyone know how to enable the search across sites functionality? I need the subsites to be indexed in the search tool.

  35. Valerie

    Thought I was crazy because I couldn’t get it working and realized it was just my impatience… the sub-domain just needed to propagate.

  36. Warren Scott

    I’m having the same problem as Rick Nieslen. I can create new sites but when I click on the link to activate it in the email I get page can’t be found.

    My host said they set my server up for wildcard domains but I’m not sure how to check that it actually is.

    Could you do a tutorial on how to enabel a network using sub-domains. Especially on step 2 setting up wildcard subdomains for apache servers.

    While searching for answers I did find a plugin that will perform steps 3 through 5 of http://codex.wordpress.org/Create_A_Network

    The plugin can be downloaded from http://wordpress.org/extend/plugins/wordpress-multi-site-enabler-plugin-v10/

  37. Jon

    I have just upgraded to 3.0 and was looking forward to playing with the multi-blog options. A little bit surprised that a manual modification of wp-config.php is required – why did Wordpress not put an option in the admin panel to turn it on?

    • Editorial Staff

      Because not everybody needs it, and by putting an option there can confuse beginners.

      Administrador

  38. wizz

    Please help me understand what is wrong.
    – firstly I create a subdomain using my CP hosting.
    – I create a website using the dashboard and it’s there under ‘my sites’. When check the subdomain folder with my ftp client, its empty.
    – I check /wp-content/blogs.dir/ and that’s also empty (I have 777 the folder)
    Are there files uploaded to the subdomain automatically or what happens?

    • Editorial Staff

      You do not need to create each subdomains in the cPanel. WordPress does that automatically.

      Administrador

      • wizz

        Thanks for the quick reply.
        This is the problem. It doesn’t.
        Is it because of the server blocking this action or because of something I missed installing the programme?
        Thanks for your help.

  39. Michael

    Thank you for this posting.

    I wonder why this information should be that hard to find.
    should the multisite function be possible to just activate / de-activate from within the user interface?

    I think so ;)

    Thank you once again; I got the information I was looking for

    Michael

  40. Mike

    Hi,
    I have followed all of the instructions as detailed above.
    I have inserted the code in the wp-config.php, where you recommend.
    I have also set up wild card subdomains in my DNS.
    ( I am running my sites on a Linux server through SEO hosting, which is part of Hostgator )
    I do not get the NETWORK menu option coming up in tools.
    Could this be because I have set up addon domains onto my primary ( account ) domain?
    I have enabled wildcard subdomains for all of the addons as well and they are all upgraded to WP 3.

    Any hints, tips or tricks are extremely welcome.

    Thanks in advance,

    Mike

    • Editorial Staff

      MU should be installed at the minimum (VPS). If you have shared hosting, then MU is not the way to go.

      Administrador

  41. RBD

    Great! Thanks!
    I know (and have) installed wp in a aub-directory and run a site from there without interfering with the root domain site. But what if the people running the root domain decide to have the sub-directory wp site manage them in the future – how would that work?

    • Editorial Staff

      For top level domains, you would need to use a Domain Mapping plugin. I think this is what you are asking for. If not then please email us.

      Administrador

  42. Vivek @ InfoEduTech

    As you all know that wordpress 3.0 is out there and have to upgrade them. You can run multiple websites in wordpress 3.0 and this tutorial will clearly indicated that how you do it.
    My question is that could i need a new installation of wordpress will upgrading to wordpress 3.0 directly through dashboard will do the work or not and for integrating the other blogs on itcould mess up all the things or not. Need your opinion on this?
    It would be a pleasure if you guys come up with a tutorial on “how to merge your blogs into one blog” badly needed at this time.

  43. Rick Nieslen

    Great website guys! You really know your WP stuff!

    Here is an issue I’m have with the new WP 3.0 and the multi-blog feature: I think I did everything as stated in all the instructions I have read when I set it up. But when I create a new site using the sub-domain setting, I get a page can’t be found. I can get to the wp-admin on the sites I create, but cant see the public side of the site. I’m using HostGator for my host. Now I remember seeing some requirements that the hosting company may need to configure to make the multi user worked, but I cant remember..du.

    Any insight with this issue would be greatly appreciated!

    Thanks again for all you do.

  44. Garden Flowers

    Just installed wordpress 3.0 release candidate for my new blog and followed your instructions to create multiple blogs in it. Pretty happy with the setup but one question.

    How to configure search on main blog, so that it searches posts in all the blogs.

  45. Dave

    I’m running Windows Server 2008 with IIS and can’t seem to find the install instructions for IIS, only Apache for WP3.0 MU. What would replace .htaccess for Windows/IIS?

    Thanks.

    Dave

    • Mike

      HI Dave,
      as I understand it WP3 requires Ill 5 to operate.
      Go linux

      Mike

  46. Dave

    That looks like its a pretty cool feature of WP 3.0 which should make my life easier.

  47. Priyamani

    i have 2 blogs, one is main & another one is sub domain, how can i combine both? mean: how to use single installation.

    • Editorial Staff

      If you were using WPMU before, simply click upgrade and it will happen. If you have them on a separate database, then you need to export the backup file for your subdomain blog. Install WordPress 3.0 and enable multi site. Then you need to create a subdomain account in your network. Then import the posts and images using the export file that you had.

      Administrador

Deixe uma resposta

Obrigado por deixar um comentário. Lembre-se de que todos os comentários são moderados de acordo com nossos política de comentários, e seu endereço de e-mail NÃO será publicado. NÃO use palavras-chave no campo do nome. Vamos ter uma conversa pessoal e significativa.