{"id":2248,"date":"2017-12-23T00:04:31","date_gmt":"2017-12-22T18:34:31","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=2248"},"modified":"2017-12-26T10:47:45","modified_gmt":"2017-12-26T05:17:45","slug":"wordpress-multisite-domain-setup","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/wordpress-multisite-domain-setup\/","title":{"rendered":"WordPress Multisite Domain setup"},"content":{"rendered":"<p><strong>Date Posted: 22-12-2017<\/strong><\/p>\n<p>In this Post we will explain how to setup multisite in wordpress.<\/p>\n<p><strong>Step 1:<\/strong> Open wp-config file and find the copy-paste following code just above the \u201cThat\u2019s all, stop editing! Happy blogging\u201d comment.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">define('WP_ALLOW_MULTISITE', true);<\/pre>\n<p><strong>Step 2:<\/strong> Open the wp-admin in browser and goto tools-&gt;Network Setup and click install.<\/p>\n<p><strong>Step 3:<\/strong>\u00a0After click install and you will get, complete the steps to enable the features for creating a network of sites.<\/p>\n<p><strong>Step 4:<\/strong> Add the following to your wp-config.php file in \/var\/www\/html\/ above the line reading \/* That\u2019s all, stop editing! Happy blogging. *\/:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">define('MULTISITE', true);\r\ndefine('SUBDOMAIN_INSTALL', false);\r\ndefine('DOMAIN_CURRENT_SITE', 'domain.com');\r\ndefine('PATH_CURRENT_SITE', '\/');\r\ndefine('SITE_ID_CURRENT_SITE', 1);\r\ndefine('BLOG_ID_CURRENT_SITE', 1);<\/pre>\n<p>&nbsp;<\/p>\n<p>Step 5: Add the following to your .htaccess file in \/var\/www\/html\/, replacing other WordPress rules:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">RewriteEngine On\r\nRewriteBase \/\r\nRewriteRule ^index\\.php$ - [L]\r\n\r\n# add a trailing slash to \/wp-admin\r\nRewriteRule ^([_0-9a-zA-Z-]+\/)?wp-admin$ $1wp-admin\/ [R=301,L]\r\n\r\nRewriteCond %{REQUEST_FILENAME} -f [OR]\r\nRewriteCond %{REQUEST_FILENAME} -d\r\nRewriteRule ^ - [L]\r\nRewriteRule ^([_0-9a-zA-Z-]+\/)?(wp-(content|admin|includes).*) $2 [L]\r\nRewriteRule ^([_0-9a-zA-Z-]+\/)?(.*\\.php)$ $2 [L]\r\nRewriteRule . index.php [L]<\/pre>\n<p>&nbsp;<\/p>\n<p>Step 5: Download WPMU DEV Domain Mapping Plugin and install it.<\/p>\n<p>Step 6: Open the wp-config file and find the copy-paste following code just above the \u201cThat\u2019s all, stop editing! Happy blogging\u201d comment.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">define('SUNRISE', 'on' );<\/pre>\n<p>&nbsp;<\/p>\n<p>Step 7: Copy the wp-content\/plugins\/domain-mapping\/sunrise.php file to wp-content folder. Use the following<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">cp \/var\/www\/html\/wp-content\/plugins\/domain-mapping\/sunrise.php \/var\/www\/html\/wp-content\/sunrise.php<\/pre>\n<p>&nbsp;<\/p>\n<p>Step 8: Go to Sites-&gt;Add new and add the sub domain.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Date Posted: 22-12-2017 In this Post we will explain how to setup multisite in wordpress. Step 1: Open wp-config file [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1019],"tags":[273,167],"class_list":["post-2248","post","type-post","status-publish","format-standard","hentry","category-cloud-aws","tag-php","tag-wordpress-2","psol-cat-cloud-aws"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-Ag","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2248","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=2248"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2248\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=2248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=2248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=2248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}