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

Så här installerar och konfigurerar du WordPress Multisite Network

Genom att konfigurera ett WordPress-multisite-nätverk kan du hantera flera webbplatser från en enda WordPress-installation. Den här funktionen är särskilt användbar för bloggar, skolor och företag som behöver driva separata webbplatser samtidigt som de har en centraliserad instrumentpanel.

Vi har använt ett multisite-nätverk för våra egna webbplatser och tycker att det är mycket användbart för att organisera innehåll för flera olika användningsområden.

I den här guiden går vi igenom stegen för att korrekt installera och konfigurera ett WordPress-multisite-nätverk, så att du får ut mesta möjliga av den här funktionen.

step by step tutorial on installing and setting up a WordPress multisite network

Eftersom detta är en omfattande artikel har vi add to denna innehållsförteckning för enklare navigation. Du kan använda snabblänkarna under för att hoppa till den section du vill lära dig mer om:

Grunderna i WordPress Multisite

  1. Vad är WordPress Multisite?
  2. Proffsen med att använda ett WordPress Multisite Network
  3. Nackdelar med att använda ett WordPress Multisite Network
  4. Vem behöver ett WordPress Multisite Network?

Installera och konfigurera WordPress Multisite

  1. Obligatoriska krav för ett WordPress Multisite Network
  2. Välja en domänstruktur för ditt multisite network
  3. Setting Up Wildcard Subdomains
  4. Konfigurera en customize domän för WordPress Multisite
  5. Aktivera funktionen för multisite network i WordPress
  6. Setting Up Your WordPress Multisite Network

WordPress Konfigurera Settings för Multisite

  1. Konfigurera Settings för nätverk
  2. Öppna ditt multisite network för registreringar
  3. Settings för ny site
  4. Uppladdare Settings för ditt Multisite Network
  5. Settings för tilläggets meny

Konfigurera standardinnehåll, standardtema och tillägg

  1. Lägga till nya webbplatser till ditt WordPress Multisite Network
  2. Lägga till teman och tillägg till ditt multisite network
  3. Lägga till standard content på nya webbplatser

Felsökning och Vanliga frågor

  1. Felsökning av problem med WordPress Multisite
  2. Vanliga frågor om WordPress Multisite

Vad är WordPress Multisite Network?

Med ett WordPress multisite-nätverk kan du driva och hantera flera WordPress-bloggar eller webbplatser från en enda WordPress-installation.

Det aktiverar dig att skapa nya webbplatser omedelbart och hantera dem med samma användarnamn och password. You kan även allow andra användare att registrera sig och skapa sina bloggar eller websites på your domän.

WordPress multisite network kommer med avancerade settings som du kan använda för att customize varje website/blogg i ditt nätverk.

Proffsen med att använda ett WordPress Multisite Network

I många situationer kan ett WordPress multisite network vara mer användbart än att hantera flera fristående WordPress webbplatser. Här är några av fördelarna med att använda ett WordPress multisite network:

  1. Som nätverksadministratör kan du enkelt hantera flera webbplatser från en enda dashboard.
  2. Varje site i nätverket kan ha sina egna admin-användare. Site admins kommer att ha capability att hantera endast sin website.
  3. Du kan installera plugins/themes och activate dem för flera webbplatser med en download.
  4. Ett multisite network gör det också lättare för dig att hantera updates. You only need to update your WordPress, plugins, or themes on one ”master” install.

Nackdelar med att använda ett WordPress Multisite Network

Att skapa ett WordPress multisite network är inte alltid till hjälp för att hantera flera webbplatser.

Här är några av de nackdelar som du bör ha i åtanke innan du sätter upp ett multisite network.

  1. Alla webbplatser i nätverket delar på samma resurser, så när ditt nätverk ligger nere går alla andra webbplatser också ner.
  2. Det är svårt för användare på nybörjarnivå att hantera trafik och serverns resurser. Om en av yours websites får oväntad trafik kommer det att påverka alla andra websites i nätverket.
  3. Om en website blir hackad blir all sites i your network hackade.
  4. Vissa tillägg till WordPress kanske inte fungerar bra i ett multisite network.
  5. Alla webbhotell har inte tillräckligt stöd för WordPress multisite-nätverk, vilket begränsar dina valmöjligheter. Vi återkommer till detta längre fram i artikeln.

Vem behöver ett WordPress Multisite Network?

Bara för att du hanterar flera WordPress-webbplatser betyder det inte att du måste börja använda ett multisite network.

Det finns verktyg från tredje part för att hantera flera WordPress-webbplatser från en enda instrumentpanel. Verktyg som InfiniteWP eller MainWP gör det enklare att underhålla flera WordPress-webbplatser under ett tak utan att behöva växla fram och tillbaka från en webbplats till en annan.

Här är några scenarier när det är meningsfullt att skapa ett multisite network:

  1. En website för ett magasin med olika sections som hanteras av separata team
  2. En website för ett företag med underwebbplatser för olika locations och filialer
  3. Webbplatser för myndigheter eller ideella organisationer som använder WordPress multisite för olika avdelningar, locations och regioner
  4. Your nätverk av bloggar som körs på flera subdomains
  5. Skolor och högskolor som använder multisite för olika avdelningar och bloggar eller låter studenter skapa sina webbplatser på skolans servrar

Obligatoriska krav för ett WordPress Multisite Network

Alla websites i ett WordPress multisite network delar samma resurser på servern. Det innebär att det viktigaste du behöver är ett bra webbhotell för WordPress.

Om du planerar att bara ha ett par webbplatser med låg trafik är delad hosting förmodligen ett bra alternativ.

Men på grund av karaktären hos ett multisite network kommer du vanligtvis att behöva VPS webbhotell eller en dedikerad server när dina webbplatser växer.

Vi rekommenderar Bluehost eftersom de erbjuder delade webbhotell och VPS/Dedikerade servrar. De är också en av de officiella partnerna för webbhotell WordPress.

Bluehost website

Om du letar efter ett alternativ erbjuder SiteGround och WP Engine också utmärkt service för WordPress multisite networks.

Förutom webbhotell behöver du grundläggande kunskaper om hur du installerar WordPress och redigerar filer med FTP.

Välja en domänstruktur för ditt multisite network

I ett WordPress multisite network kan du lägga till new sites med hjälp av antingen subdomains eller subdirectories.

Exempel på en subdomän:
http://site1.example.com

Exempel på underdirectory:
http://example.com/site1/

Om du väljer subdomains måste du konfigurera subdomains med jokertecken på din server. Vi visar you hur man gör det i nästa steg.

Om du däremot väljer underkataloger eller sökvägsbaserade URL:er för webbplatser i ditt nätverk kan du hoppa över nästa steg.

Setting Up Wildcard Subdomains

Subdomäner med jokertecken skapar en placeholder-subdomän under ditt domain name. Denna placeholder-subdomain kan sedan användas för att mappa subdomains som du inte redan har definierat.

Med denna inställning aktiveras WordPress Multisite för att skapa nya sites med egna subdomains.

Om du bestämmer dig för att använda subdomains för websites i ditt multisite network måste du konfigurera wildcard subdomains.

Vi kommer att visa dig hur du gör det på Bluehost. Den grundläggande processen är dock densamma för alla hosting providers.

Först måste du logga in på ditt WordPress webbhotell-kontos dashboard. Locate your site under Websites och click på knappen ”Settings”.

Bluehost site settings

Detta kommer att öppna din webbplats Settings page, där du måste byta till ”Advanced” tabs.

Därifrån rullar du ner till section cPanel och klickar på knappen ”Hantera”.

Bluehost cPanel under Advanced site settings

Detta kommer att starta cPanel dashboard.

Nu rullar du ner till sektionen Domäner och klickar på ”Domäner”.

Bluehost cPanel domains

Det kommer då att visa you en lista över domäner och subdomains på ditt webbhotell account.

Du måste klicka på knappen ”Create A New Domain” för att fortsätta.

Bluehost cPanel new domain

På nästa vy måste du lägga till en subdomain med jokertecken under fältet Domän.

En subdomain med jokertecken innehåller en asterisk följd av en punkt och ditt domain name. Likes så här:

*.exempel.com

Glöm inte att ersätta example.com med ditt domännamn.

Bluehost cPanel wildcard subdomain

Dokumentets rotfält fylls i automatiskt så att det matchar jokertecknet.

Klicka bara på knappen ”Submit” för att save dina settings för domänen.

Ditt webbhotell account är nu redo att stödja WordPress multisite med subdomains.

Konfigurera customize domäner för varje site

WordPress multisite allows you also to set different domäner for each website in your multisite network.

Om du vill konfigurera customize-domäner måste du använda funktionen för ompekning av domäner och updating av namnserverposter i ditt konto hos domänregistratorn.

Manage sites

Vi har skapat en detaljerad Step-by-Step guide om hur du skapar WordPress multisite med olika domäner med setup instruktioner.

Aktivera funktionen utvald för multisite network i WordPress

Funktionen för multisite-nätverk är inbyggd i varje WordPress-installation. För att använda den behöver du bara installera och konfigurera WordPress på samma sätt som vanligt.

Efter det behöver du bara aktivera funktionen multisite. Du kan också aktivera funktionen multisite på en befintlig site i WordPress.

Innan du aktiverar Multisite, glöm inte att göra en fullständig backup av din WordPress site.

Anslut sedan till din site med en FTP-klient eller cPanel-filhanterare och öppna filen wp-config.php för edit.

Du måste add to följande kod till din wp-config.php-fil precis före /* Det var allt, sluta edit! Trevlig publicering. */ rad:

/* Multisite */
define( 'WP_ALLOW_MULTISITE', true );

När det är gjort kan du save och uploada filen wp-config.php till servern.

Denna kod aktiverar helt enkelt funktionen multisite på din WordPress site. När den är aktiverad måste du fortfarande konfigurera multisite network.

Setting Up Your WordPress Multisite Network

Nu när du utan problem har aktiverat funktionen multisite network på din WordPress site, är det dags att konfigurera nätverket.

Om du installerar ett multisite network på en befintlig WordPress-webbplats måste du deactivate alla tillägg på din website.

Besök bara sidan Plugins ” Installerade plugins och välj alla plugins. Välj sedan ”Deaktivera” i rullgardinsmenyn ”Massåtgärder” och klicka på knappen ”Verkställ”.

Deactivate all plugins

You can now head over to the Tools ” Network Setup page.

Här kan du konfigurera ditt multisite network.

WordPress multisite network setup

På vyn för nätverksinställningar kommer du att notera att du behöver installera Apaches mod_rewrite-modul på din server. Denna modul är installerad och aktiverad på alla de bästa hosting providers för WordPress.

Därefter måste du berätta för WordPress vilken domänstruktur du ska använda för webbplatser i ditt nätverk, t.ex. subdomäner eller underkataloger.

Efter det måste du ange en rubrik för ditt nätverk och se till att email addressen i fältet ”Network Admin Email” är korrekt.

Klicka på knappen ”Install” för att fortsätta.

WordPress kommer nu att visa dig lite kod att add till din wp-config.php och .htaccess-filer, respektive.

Add WordPress multisite configuration rules to wp-config and .htaccess files

Du kan använda en FTP-klient eller filhanteraren i cPanel för att copy and paste koden.

Först redigerar du filen wp-config.php och klistrar in koden precis under raden som du addade i det tidigare steget.

För det andra måste du editera .htaccess-filen och ersätta de befintliga WordPress-reglerna i din .htaccess med WordPress Multisite-koden som du kopierade.

Glöm inte att save dina ändringar och ladda upp de editerade filerna på nytt till din server.

När du är slutförd måste du logga in på din WordPress site igen för att få tillgång till multisite network.

Konfigurera Settings för nätverk

Nu när du har konfigurerat multisite network är det dags att konfigurera nätverksinställningarna.

Börja med att logga in i admin area på din website i WordPress.

Efter det måste du byta till inställningarna för ”Network Dashboard” för att ändra nätverksinställningar, add new sites och konfigurera andra inställningar.

När du för muspekaren till menyn ”My Sites” i adminverktygsfältet visas en popup-ruta med en flydown. Klicka på Nätverksadministratör ” Dashboard.

WordPress multisite network admin dashboard

Detta kommer att ta dig till dashboard för multisite network. You will notice that there are new menu items to manage your multisite network.

Du kommer också att se ett widget för dashboard ”Right Now” som allow you att skapa en new site och add new användare.

Multisite admin area

För att konfigurera nätverksinställningar klickar du på länken ”Settings” i sidofältet för admin.

Det första alternativet på sidan för nätverksinställningar är att ange din site admin-titel och admin email address. Dessa rubriker fylls automatiskt i med den nätverkstitel och admin email som du enterade under installationen.

WordPress multisite general settings

Öppna ditt multisite network för registreringar

Section ”Registration Settings” på sidan för nätverksinställningar är förmodligen den viktigaste inställningen i hela din nätverksinstallation.

Som standard är registrering av både användare och webbplatser inaktiverat i nätverket.

Du kan välja att öppna din webbplats för användarregistrering, tillåta endast befintliga användare att skapa nya webbplatser eller tillåta både användar- och webbplatsregistrering.

Allowing user and site registration on a WordPress multisite

Om du öppnar ditt multisite network för registrering kan du kontrollera boxen bredvid alternativet ”Registration Notification”.

This will allow you to receive email notifications every time a new användare or site is registered.

Om du vill tillåta enskilda webbplatsadministratörer att lägga till nya användare på sina webbplatser markerar du rutan bredvid alternativet ”Lägg till nya användare”.

Additional multisite settings

Alternativet Limited Email Registration allow you to limit site or user registration to email addresses from specific domains.

Detta är särskilt användbart om du vill att endast personer från din organisation ska kunna registrera och skapa användare eller webbplatser.

På samma sätt kan you också förbjuda vissa domäner från registrering.

Settings för ny site

I section ”New Site Settings” allow you to configure standard options for new sites created on your multisite network.

Du kan ändra välkomstmailen och innehållet i den första standardposten, sidan och kommentaren i de här inställningarna.

New site settings for WordPress multisite

Som nätverksadministratör kan du ändra dessa Settings när som helst.

Uppladdare Settings för ditt Multisite Network

Det är viktigt att övervaka användningen av dina serverresurser. Under avsnittet ”Upload Settings” kan du begränsa den totala mängden utrymme som en webbplats kan använda för uppladdningar.

Standardvärdet är 100 MB, vilket förmodligen räcker för minst 100 fotouppladdningar. Du kan öka eller minska detta utrymme beroende på ditt diskutrymme.

WordPress multisite uploads settings

Standardfiltyperna för uppladdning är bilder, ljud, video och PDF-filer. Du kan lägga till ytterligare filtyper, t.ex. doc, docx, odt och så vidare.

Därefter kan du välja en limit för filstorlek så att användarna inte kan uploada vansinnigt stora filer till servern.

Settings för menyn i pluginet

Därefter kan du hoppa till Menu Settings. Det kommer att tillåta dig att aktivera den administrativa menyn för tillägg sektionen på ditt nätverk webbplatser.

WordPress multisite plugin menu

Om du aktiverar detta visas tilläggsmenyn för respektive site admins. De kan aktivera eller deactivate ett plugin på sina webbplatser, men de kan inte installera new plugins.

När du är nöjd med alla konfigurationsinställningar, fortsätt och klicka på knappen ”Save Changes”.

Lägga till nya webbplatser till ditt WordPress Multisite Network

För att add a new site to your WordPress multisite network, simply click on ’Sites’ under My Sites ” Network Admin menu in the admin-verktygsfält.

Managing sites on a WordPress multisite

Detta kommer att visa dig en lista över webbplatser på din nuvarande multisite-installation. Som standard listas din primära webbplats som den enda webbplatsen i ditt WordPress-multisitenätverk.

För att lägga till en ny site, click the ”Add New” button at the högst upp.

Adding a new site in a WordPress multisite network

På sidan ”Add New Site” anger du webbplatsens adress. Du behöver inte skriva hela adressen, bara den del som du vill använda som subdomain eller subkatalog.

Därefter lägger du till en rubrik för webbplatsen och anger site admins email address.

Adding new site details

Du kan lägga till en annan email address för admin än den som du för närvarande använder för att hantera ditt multisite network.

Om en annan användare inte använder den email addressen för närvarande kommer WordPress att skapa en new användare och skicka användarnamn och password till den email address you enter.

När du är klar klickar du bara på knappen ”Add Site”.

En ny webbplats kommer att läggas till i ditt WordPress-multisite-nätverk. Du kommer också att få ett e-postmeddelande om registrering av en ny webbplats som nätverksadministratör.

Om du skapar en ny användare får användaren ett e-postmeddelande med instruktioner om hur man ställer in lösenordet och loggar in.

Lägga till teman och tillägg till ditt multisite network

Som standard kan enskilda administratörer av webbplatser i ett multisite network inte installera themes och tillägg på egen hand.

Som network admin kan du installera respektive tillägg och themes så att de blir tillgängliga för alla webbplatser i ditt nätverk.

Installera teman för ditt Multisite Network

Om du vill add to teman går du till sidan My Sites ” Network Admin ” Themes.

WordPress multisite themes

På den här page visas en lista över de themes som för närvarande är installerade på your WordPress multisite.

Du kan göra ett tema tillgängligt för andra webbplatser genom att clicka på alternativet ”Network Enable” under det temat.

Du kan också inaktivera ett tema genom att klicka på länken ”Network Disable” under det. Observera att alternativet Network Disable endast visas när temat är aktiverat.

För att lägga till ett nytt tema klickar du på knappen ”Add New” högst upp på skärmen och installerar ett WordPress-tema som vanligt.

När det nya temat har installerats kan du göra det tillgängligt för andra webbplatser i ditt nätverk med alternativet ”Network Enable”.

Om du behöver rekommendationer om vilka teman som ska göras tillgängliga för ditt nätverk, här är våra val av de bästa WordPress teman som du kan använda:

Ställa in ett standardtema för ditt multisite network

Även om du har lagt till ett par teman kommer WordPress fortfarande att aktivera standardtemat för varje ny site.

Om du vill göra ett annat tema till standard för nya webbplatser måste du add to följande kod till din wp-config.php-fil:

// Setting default theme for new sites
define( 'WP_DEFAULT_THEME', 'your-theme' );

Ersätt your-theme med namnet på ditt theme. Du måste använda namnet på temats folder, som du hittar genom att titta på mappen /wp-content/themes/ med FTP eller File Manager.

Installera tillägg för ditt Multisite Network

På samma sätt kan du besöka My Sites ” Network Admin ” Plugins page för att installera tillägg och klicka på länken ”Network Activate” under varje plugin för att aktivera det på ditt multisite network.

Network activate plugins

Här är några viktiga tillägg till WordPress som vi rekommenderar för alla websites:

För fler rekommendationer om tillägg, se vår lista över de viktigaste WordPress-tilläggen för alla websites.

Obs: Om du tidigare har aktiverat alternativet Plugins Menu för webbplatsadministratörer i ”Nätverksinställningar” kan webbplatsadministratörer aktivera eller inaktivera installerade plugins på egen hand. De kan dock inte ta bort eller installera ett nytt insticksprogram på egen hand.

Lägga till standardinnehåll till Multisite-webbplatser

Som standard tillåter WordPress dig att lägga till och editera en del standard content för varje site i ditt multisite network. Du kan gå till Settings ” Network Settings page och add to detta content i ”New site settings” section.

New site default content in WordPress multisite

You can edit the content for the standard post, page, and comment. Vi rekommenderar att du ersätter standardinnehållet med något som är mer användbart för dina site admins.

Men tänk om du vill att ytterligare standard content ska läggas till på varje new site?

Som standard ger WordPress dig ej ett alternativ för att skapa ytterligare standard content för nya webbplatser. Om du vill göra det måste du add to custom code till din WordPress multisite.

I det här exemplet ska vi add to en ny standard page som ska skapas för varje ny site. Du kan add to denna kod till din huvudwebbplats functions.php-fil eller genom att använda WPCode plugin på din huvudwebbplats:

add_action('wpmu_new_blog', 'wpb_create_my_pages', 10, 2);
  
function wpb_create_my_pages($blog_id, $user_id){
  switch_to_blog($blog_id);
  
// create a new page
  $page_id = wp_insert_post(array(
    'post_title'     => 'About',
    'post_name'      => 'about',
    'post_content'   => 'This is an about page. You can use it to introduce yourself to your readers or you can simply delete it.',
    'post_status'    => 'publish',
    'post_author'    => $user_id, // or "1" (super-admin?)
    'post_type'      => 'page',
    'menu_order'     => 1,
    'comment_status' => 'closed',
    'ping_status'    => 'closed',
 ));
   
restore_current_blog();
}

Du kan använda samma kod med små ändringar för att skapa standard posts för nya webbplatser. Kolla in följande kod:

add_action('wpmu_new_blog', 'wpb_create_my_pages', 10, 2);
  
function wpb_create_my_pages($blog_id, $user_id){
  switch_to_blog($blog_id);
  
// create a new page
  $page_id = wp_insert_post(array(
    'post_title'     => 'A sample blog post',
    'post_name'      => 'sample-blog-post',
    'post_content'   => 'This is just another sample blog post. Feel free to delete it.',
    'post_status'    => 'publish',
    'post_author'    => $user_id, // or "1" (super-admin?)
    'post_type'      => 'post',
 ));
   
restore_current_blog();
}

Felsökning av problem med WordPress Multisite

De vanligaste problemen med nätverksinställningar för WordPress multisite är felaktig konfiguration av subdomäner med jokertecken och problem med domänmappning. Innan du konfigurerar multisite ska du kontrollera att ditt webbhotell stöder subdomäner med jokertecken.

Följer är några andra vanliga issues och deras snabba fixar.

Fixa login-problem på Multisite installationer

En vanlig issue är att när man använder WordPress multisite med underkataloger, kan vissa användare inte logga in på admin area på sina webbplatser efter att de har addat den obligatoriska koden i wp-config.php filen.

För att fixa detta, lokalisera följande rad i wp-config.php-filen:

define('SUBDOMAIN_INSTALL', false);

Nu ersätter du den helt enkelt med följande rad:

define('SUBDOMAIN_INSTALL', 'false');

Hitta obekräftade användare

En annan issue you may encounter is not being able to find users who registered on your network but didn’t get the activation email.

För att fixa detta problem, se vår guide om hur man hittar inväntade obekräftade användare i WordPress.

Exportera en site från Multisite till en egen installerad WordPress

Senare kanske du eller någon annan webbplatsägare vill exportera en webbplats från multisite till en separat WordPress-installation. Detta kan enkelt göras. För steg-för-steg-instruktioner, se vår guide om hur du flyttar en webbplats från WordPress multisite till en enskild installation.

Du kanske också vill bokmärka vår ultimata guide till vanliga WordPress error och hur du fixar dem. Detta kommer att save you mycket tid på att fixa de vanligaste WordPress issues snabbt.

Vanliga frågor om WordPress Multisite Network

Många av våra användare har ställt oss många frågor om WordPress multisite network och hur man använder det mer effektivt. Följ de vanligaste frågorna som vi har besvarat.

1. Skulle jag kunna hantera mina webbplatser bättre med ett multisite network?

Ärligt talat beror svaret på hur du använder den.

Till exempel, om dina webbplatser inte är relaterade till varandra, skulle du ha det bättre med ett verktyg för hantering av flera webbplatser som InifiteWP.

Men om du hanterar flera webbplatser för en restaurangkedja, ett universitet eller ett online magasin, då WordPress multisite kommer att vara mer effektivt.

2. Gör WordPress multisite att mina websites laddar snabbare?

Återigen beror det på flera faktorer. Bättre WordPress webbhotell med gott om serverresurser kommer att allow multisite att vara snabbare, men å andra sidan, med dessa resurser, enskilda WordPress webbplatser kommer också att springa snabbare.

Men på ett konto på ett delat webbhotell kommer trafiktoppar att öka minnesanvändningen och sakta ner alla webbplatser på multisite network samtidigt. För att förbättra hastigheten på multisite, se vår guide om WordPress prestanda och hastighetsoptimering.

3. Kan jag add to en online store till en WordPress Multisite website?

Ja, du kan add to en online store i WordPress multisite network. Troligtvis kommer du att använda ett plugin för ecommerce som WooCommerce för det, som är kompatibelt med WordPress multisite.

4. Kan jag installera ”x plugin” på min WordPress multisite?

Vissa tillägg till WordPress kanske inte är kompatibla med WordPress Multisite. Normalt nämner plugin-författare det på pluginets webbplats, och du kan undvika att installera ett plugin som kanske inte fungerar på en multisite-installation. Men om det inte nämns, är det säkert att anta att det är kompatibelt med multisite.

5. Hur delar jag användares login och roller över multisite network?

Som standard kan en användare som är registrerad på en site inte registrera sig eller läggas till på en annan site i samma nätverk. Det beror på att de redan är registrerade i den delade WordPress-databasen. De har dock inga privilegier för användarroller på andra webbplatser.

Du kan använda tillägg från tredje part som gillar WP Multisite User Sync för att synkronisera användare över nätverket. Du måste dock vara försiktig, eftersom det kan sluta med att du ger någon admin-behörighet till en site.

Vi hoppas att den här artikeln hjälpte dig att lära dig hur du installerar och konfigurerar ett WordPress-multisite-nätverk. Du kanske också vill se vår handledning om hur du skapar en WordPress-multisite med olika domäner eller vårt expertval av de bästa WordPress-multisite-pluginsen.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Avslöjande: Vårt innehåll stöds av våra läsare. Det innebär att om du klickar på några av våra länkar, kan vi tjäna en provision. Se hur WPBeginner finansieras, varför det är viktigt, och hur du kan stödja oss. Här är vår editoriala process.

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.

Den ultimata WordPress-verktygslådan

Få GRATIS tillgång till vår verktygslåda - en samling WordPress-relaterade produkter och resurser som varje professionell användare bör ha!

Reader Interactions

255 kommentarerLämna ett svar

  1. Syed Balkhi

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. WTF

    I have a pretty cool domain and I want to start a wp network on it so people can create blogs and website with a selection of my own themes.
    I would like to know what I need to do legally to keep the possibility to shut down all the sites if I decide not to host them anymore. Is there a terms and agreements I should use or is it already included? If anybody has any experience with hosting multiple sites it would be very helpful with me.

  3. Ganesh

    Sir,

    I have recently added multisite in wordpres, But now feed burner is not working in multisite.

  4. Mercedes

    Hello WP Beginner

    Your site has helped me once more to figure out that I needed mod_rewrite to install multisite. My hosting service will not provide the code and say that I need a developer.

    Can you please assist? I see a lot of mod rewrite codes but am not sure which one to use

    Thanks again
    Mercedes

  5. Mahesh

    Is wildcard sub domain works for parked domain. Its create the sub domain but showing:

    ”Internal Server Error

    500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.”

  6. Savya

    Hi,

    I am trying to setup a subdomain on my blog using the multisite feature but I always get error. I even setup the wildcard subdomain rule in the cPanel but it doesn’t seem to be helping much.

    Can you help me out, please?

  7. itzforu

    Hello Team,

    is it possible to configure multisite on currently running wordpress site?

    Thanks in advance

  8. Edmond

    Great article, i have installed multisite and everything goes well but when i activate google analytic plugin, i can do anything on my network admin, i can install any plugin and i get error.

    Another issue, i installed WP domain Mapping.When i want to settup it want me to add some codes. i did all and it didnt work. Can you please give me steps that will lead me to success? i will appreciate that.

  9. Stanislaw Schmidt

    Hi, great tutorial!
    Is it mandatory to create a wildcard subdomain, if i go with subdomain structure? Or can i create the subdomains manually?
    Cheers, Stanislaw

  10. siva

    Hi
    Thanks for wpbeginner Team very easily to understanding your all information, lot of thanks….

  11. Joerg Buyna

    Thanks sooo much for this article. It is very well structured and written. Saved me hours of valuable time.

    JMB

  12. vishal

    I create my own multisite network site. my primary site working but when i create new site it’s not working ??? gives error Not Found??? i use sub directory structure so word-press add the directory it self or we can create those directory manually when add new site……i am confuse ????

  13. Natalya

    I’m surprised you recommend BlueHost in this article, even though they state they don’t support multisite.

      • Natalya

        I asked this question of Bluehost, and this is their response (direct quote):
        ”Lou
        We do not have a plan available that includes tech support for multisite, unfortunately.”

  14. sanj

    Dear Author;
    i do that but when i input url of a new site in menubar:

    Not Found

    The requested URL /index.php was not found on this server.
    Apache/2 Server at abc.example.com Port 80

    appear. what is the reason?

  15. vinay kumar singhal

    Error establishing a database connection

    After create site1 in network it show database error
    please help me
    my code is

    define(’MULTISITE’, true);
    define(‘SUBDOMAIN_INSTALL’, ‘false’);
    define(’DOMAIN_CURRENT_SITE’, ’example.com’);
    define(’PATH_CURRENT_SITE’, ’/’);
    define(’SITE_ID_CURRENT_SITE’, 1);
    define(’BLOG_ID_CURRENT_SITE’, 1);

  16. Hardy

    Please help me
    i am new for multisite on wordpress , i setup multisite but show this error An existing WordPress network was detected. Please solve this error with me.

  17. leen

    Hi,

    Thanks for this handy & detailled tutorial!

    I recently started setting up a city guide, with shopping locations in all the major Belgian cities, in WP.

    But I am wondering now if a MultiSite is a good idea: because I do not want all my diferent subdomain sites (cities) to diappear, when there is a hacking problem, or when one subdomain goes down.

    What would you advice, for such directories: multi or single…?

    Thanks a lot!

    & best regards,
    Leen / Belgium

    • WPBeginner Support

      It all come downs to convenience. If you are able to easily manage multiple installs on sub-domains, then you should stick to it. However, if you feel that managing multiple installs is difficult, then you can try multisite network. Creating a multisite network would allow you to quickly create new sites, switch between sites, manage themes, plugins, and backups. But it also means that if your WordPress install is hacked, all your sites will go down with it.

      Administratör

  18. Pierre

    I done all what you said but when i create a new site, exemple : test.noov.fr , and i go on test.noov.fr, it dosen’t work. So i must create manually a subdomain called test.noov.fr and put the wordpress. Then it’s working, but i want that what i said became ”automatic” when i create a new site on my network wordpress. Thanks if you can answer

    • WPBeginner Support

      Pierre seems like you either missed the wild card domain setup or it is not working on your host. Please contact your web hosting service provider.

      Administratör

  19. Mark Ballou

    Hello,

    I’ve scoured the Internet for information on Multisite and found tons of useful information, but am still unsure of how to proceed. Since my searches always lead me back here, I thought I’d reach out. Though there haven’t been any comments in a while, I was hoping you’d be able to help me decide whether Multisite is a good solution for me, and if so, clarify the best steps to take to implement it. I want to be forward thinking and avoid headaches down the road, setting up a solid foundation for my WP sites.

    The Backstory: I’m new to WP and have setup a blog at my already hosted domain with Godaddy. I used a subdomain (blog.mydomain.com) and install WP in the subdomain using Godaddy’s WP installation tool.

    I’d previously had the low traffic blog on Blogger but was frustrated by the limitations. Realizing I could piggyback off of webhosting I already paid for, I migrated all the posts over to a subdomain on my Godaddy plan using Blogger Importer Extended. I then linked them using Blogger 301 Redirect. I had to clean some formatting up, but overall it has been working out well, and as far as I can tell people are finding their way from old Blogger links to the new WP blog without issue.

    Now that I’m a bit more comfortable with WP, I’m thinking of building a new site for my root domain, replacing the outdated Flash site that is there now. The blog and the root domain site are not associated, The blog is personal and the root domain site is separate for work, a kind of demo/resume site. I also have another completely separate domain, for a different business site I have. It’s also a very basic html resume page that I’m leaving alone for now. Down the line I might want to have a static page at my primary domain that acts as a portal to my different sites, but for now, will likely have only two sites to manage (mydomain.com and blog.mydomain.com).

    Let’s start with this question: Is this a good time to establish a Multisite framework? Is the scenario I describe appropriate for its use? Or should I just keep it simple and have two separate WP installs and only deal with Multisite if things get more complex down the line?

    I look forward to your reply!

    • WPBeginner Support

      Keeping separate installations of WordPress has its own benefits. For example, each of your site can be customized without affecting other sites on the network. You can move a single site easily if it grows beyond your expectations. You can automate the updates process so that your sites need minimal supervision.

      On the other hand if you feel that you will benefit from making a network of your sites using the same WordPress core, then you can do that too. We don’t think it would be anymore efficient than separate installs for each site.

      Administratör

  20. sunil

    Hey there,
    i want to know how many subdomains create from wordpress admin panel with 1 wildcard subdomain

  21. Sumit Agarwal

    Hey there,

    I am owner of and the website is running on a multisite network…Google indexes the website well but it does not index or crawls through my subdomains…Is it because somewhere in multisite network installation nofollow has been used?

    Regards,
    Sumit

    • WPBeginner Support

      When people create their blogs on your network they can choose whether to keep it public or hide it from search engines.

      Administratör

  22. Alvaro Portela

    Hi there! I was wondering if I can use WordPress Multisite just for subdomains. What I mean is: I want to make a landing page (no wordpress theme) with 2 options (Option A and Option B) this is http://www.example.com and 2 subdomains ”optionA.example.com” and ”optionB.example.com”. I want 2 Home pages with different content, option A subdomain will have only those articles with optionA tag and the same for option B, but I want to manage that from only one wordpress installation. Is this posible?

  23. shane

    when you crete a sub dmain does it crete a new sub domain folder on my host that i can access via ftp

  24. Peter Wade

    Great article, but I missed seeing how to delete all but one of the current installs. I have two subdomains and one subdirectory with separate WP installs in them. What do I delete in those, please, after multisite is set up?

  25. Maureen

    Hi,

    When I installed the multisite network I did NOT have the choice between subdomain or sub directories so i just click on install. Now my 1st site is running but when im going to my dashboard to the other site it says page not found.
    I think it went as a sub domain because in the network setup they asked me to paste (’SUBDOMAIN_INSTALL’, true)> That’s NOT what I wanted. I wanted to have sub directories. I tried to put instead (’SUBDOMAIN_INSTALL’, false) but it doesn’t work at all!!

    I dont know how to fix this.
    I need someone to help me out! Can I change and co back to sub directories?

  26. WPBeginner Staff

    Yes it could be. Make sure that your have the correct site URL and WordPress URL in Settings -> General page in admin settings.

  27. seosamba

    WordPress multisite is such a nightmare. I mean why would you put all your eggs in the same basket?
    I mean how is it acceptable to anyone that if 1 site goes down, all go down? Or that if 1 is hacked, all are lost to hackers?
    Of course, you might disregard this because you hope this will never happen, I tend to think it’s just a matter of time before it does.

    Besides, I know many folks are building a network of thin original content websites that is supposed to perform with search engine, like for local franchisees, point of sales, distributors and such.

    Unfortunately, from a SEO standpoint, any duplicated content served from the same block of IP”s will be rapidly shown the way to supplement index results, so to me the WP multisite architecture is not only unflexible, it is also very flawed.

  28. Marshall Hunt

    Hello! I followed your steps (including the ’false’ trouble-shooting change to my config file), but I am getting a redirect loop for my sub-directory folders ( I set up two). Is there something else I can do? I haven’t bought a domain yet, I’m using my website providers temporary ip address to house my website, , so could that possibly have something to do with it? Thanks for the help! Really enjoyed the article and was able to set up with no difficulty except I can’t access it. :P

  29. cedric

    i hope you can help me,I enabled multisite,i did the writeing in the config.php , i did all the steps here on the page i installed the network i created my custom user and a website for the user but when the user wants to login this apears:

    Warning:
    require_once(/home/u645014264/public_html/demoshop/wp-includes/load.php):
    failed to open stream: No such file or directory in
    /home/u645014264/public_html/demoshop/wp-load.php on line 41

    Fatal error: require_once(): Failed opening required
    ’/home/u645014264/public_html/demoshop/wp-includes/load.php’
    (include_path=’.:/usr/lib/php’) in
    /home/u645014264/public_html/demoshop/wp-load.php on line 41

    please help me

  30. WPBeginner Staff

    Add domains to your web hosting account. Select a different directory for each domain. Then install a separate copy of WordPress in each directory. See your web host’s help/documentation section to learn about how to add domain names.

  31. WPBeginner Staff

    You can have multiple instances of WordPress, each with its own domain name, running on the same server. You don’t necessarily need a multisite network.

    • christian

      Thanks for your response. I have trouble finding a guide or documentation for this, do you know where to find some info?

  32. christian

    Is it possible to host different domains on one multisite installation, domain1.com, domain2.com etc.? If not, what is the best solution for hosting different sites on the same server? Our company has 3 domains we need to host and I would prefer it to be on the same server.

  33. Steve

    Hi, is it possible to create another network under the same domain? Right now I have the main network with a list of subsites all in subdirectories. I want to create another network under the same domain where I can create a separate network of sites that are for a different purpose but still part of the original domain.

    All the solutions I see require that I use a different domain when settings up multi-networks.

    Thanks

  34. DJEB

    I managed to create a really boring site that only displays ”
    Error establishing a database connection”

  35. David

    Hi There,
    I installed multisite network. My 1st site is running but when im going to my dashboard to the other site it says page not available.
    I think something went wrong with the subdomains wildcard, but i dont know how to fix this. Do i have to make a subdomain manually ?
    I hope someone can help me out!
    Cheers, David – The Neterlands

    • Nitesh

      Hi david, you just need to edit define(’SUBDOMAIN_INSTALL’, ’false’); insted of define(’SUBDOMAIN_INSTALL’, false); in config.php

  36. Rihan

    This is great! very usefull and can you please tell how to point a domain using domain mapping plugin for subdirectories installation :) Thank you very much :)

  37. Jorge Diaz

    Hi, I am in a bit of a trouble here… I don’t fully understand, I activated multisite, ok, wildcard, ok, but when I add a new site I get a blank page or 404 error. So my question is Do I need to install WordPress 2 times? And enable multisite in the main domain and add the second site or I just have to install the main WordPress and just enable multisite?

    • Gerald Eder

      Same problem with Jorge. 404 page if i wanna get to the dashboard of the new site on the subdomain.

    • Gerald

      Hi, i have the same problem. mulitsite installion ok, wildcard ok, but when i want to enter the dashboard of the new site i get a 404 error. can you pls advise?

  38. CopiousJ

    I would strongly suggest sub-folders not sub-domains – its better for SEO from what i’ve read through reliable sources like MOZ- should at least give people that option when giving instructions, just a suggestion.

    • Kenneth Guinto

      i would say not true at all as it depends on the nature of the site on how it would brand itself. ive been working for an organization that has multisite install for 4 years now and its on a subdomain. i would suggest though when comes to SEO matters… its much better to rely on the specifications set by the search engines themselves.

  39. WPBeginner Staff

    Thats because you missed a line break or space between / and define. Use it like this:

    /* Multisite */
    define( ’WP_ALLOW_MULTISITE’, true );

  40. Marco Floriano

    Thank you very much for this amazing tutorial!

    • Jyoti

      At our end m not getting telnet reply as we don’t have full access to the internet in SDC but i am getting the hit count on the port so the traffic is through at our end .

  41. Michael

    I put this in and get a syntax error
    /* Multisite */define( ’WP_ALLOW_MULTISITE’, true );

  42. lime_ice

    Thank you – this was so useful!

  43. Greg

    Yes, go to your cPanel and add the sub domain * nothing else and leave it at your root html folder all done

    • francisco paulo

      Thank you, Greg!

    • Wade Steele

      Greg – When I add a sub domain (at Bluehost) it will not allow me to keep the sub doamain at the root directory, it will automatically add a new subdirectory within my root directory for the newly created sub domain. Is there someway around this because I get the 404 error too.

  44. francisco paulo

    what if I’m not able to create Wildcard subdomains? Can I manually create the subdomains (under cPanel) I intend to use with WordPress?

  45. Vivienne Eggers

    Hi, I’ve installed multi site and WP multi network and no problem creating sub domains or creating users. But assigning privileges? I assumed that since (Extended Super Users which I have installed also) only removes privileges assigned to a certain role and that role is assigned to an existing user – that ANY new users I set up would default to Super Admin – if I tick the box in settings ”assign super admin access to this user”. Great – but I am doing this as the super admin – I’ve created a network, assigned sites, I can delete the site, edit the (sub) domain and path but when I attempt to access the ”network admin” area it tells me I don’t have sufficient privileges to access the area. I’m a little confused. I want to create a network, assign sites and assign an admin user name – grant that user ”full” privileges to all sites I have assigned in that specific network. I’m happy to do that by removing super admin privileges in a created role – but I’m having issues just creating network and assigning. After creating a network I want to be able to access it also as a Super admin. When I try to access the network via the emailed username and password of the network I set up I can access ”my network” dashboard but then get an error message – file not found. Is there somewhere I can access detailed instruction on these steps?

  46. WPBeginner Staff

    Nope, we didn’t. First you need to Allow multisite, after that you need to run the network setup. After you have run the setup. Depending on what options you choose during the setup WordPress will show you the code that needed to be entered in the wp-config.php file. The line you mentioned is one of the lines provided by WordPress after the setup and it can be different if a user opted for sub-directories instead of subdomains.

    • Rone

      If i want poin a deffernt domain name? it is possible?

  47. karma_musings

    I’ve converted a single site installation into a multisite, following both your directions here and the WordPress Codex. However, every time I try to go to the dashboard of a newly added subsite (myexample.mainsite.org) the browser response is that it can’t be found. I’ve gone over the instructions several times and replayed what I did, but I can’t figure out why this is happening. Shouldn’t the default theme have been automatically assigned to my new site? and shouldn’t I be able to start editing my new site from there? I did, as my first step, go to my host’s cPanel and set up the subdomain wildcard; before that even, I contacted the host to verify that my hosting situation (shared hosting) would support a multisite situation.

    Ideas? I appreciate it, thanks!

    • WPBeginner Staff

      Please contact your web host to make sure that they allow you to create wild card subdomains.

      • karma_musings

        Thank you. I did confirm that was ok. I still don’t really know what the issue was, but after spending an hour on the chat line with my hosting provider, and giving him super admin access to my site, it’s all fixed! Hooray :-)

  48. Clifford Enoc

    should be:

    line in wp-config.php file with

    define(’SUBDOMAIN_INSTALL’, ’true’);

    It’s just repeated from the first line. I know you overlooked that ;)

  49. ajeets

    what if i like to rollback WordPress Multisite network into single site, what is process to do that ?

Lämna ett svar

Tack för att du väljer att lämna en kommentar. Tänk på att alla kommentarer modereras enligt våra policy för kommentarer, och din e-postadress kommer INTE att publiceras. Vänligen använd INTE nyckelord i namnfältet. Låt oss ha en personlig och meningsfull konversation.