25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

Need help?

Our experts have had an average response time of 11.43 minutes in March 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Craft CMS multisite – A smart way to setup multiple websites

by | Aug 3, 2019

Content Management System aka CMS makes website building easy.

But, what if you have more than one cms website? Definitely, you have to remember site logins for each website.

Luckily, Craft CMS multisite is one of the quick solutions that allows managing multiple cms websites through a single Craft 3 install.

At Bobcares, we often get requests from our customers to set up Craft CMS multisite as part of our Server Management Services.

Today, we’ll see how our Support Engineers set up Craft CMS multisite and fix related errors

 

How we set up Craft CMS multisite

Basically, Craft 3 allows hosting multiple websites in a single Craft installation. So, let’s see how our Support Engineers install Craft CMS with the following steps.

1. Initially, we download the craft cms either by Composer or by manually downloading a zip or tar.gz archive.

Note that, when using Composer, there is no need to extract the downloaded Craft files.

composer create-project craftcms/craft 

But, in the manual downloading method, we need to extract the files after downloading the zip files.

2. So, we extract the archive into a new directory wherever we want this new Craft project to live.

3. Next, we set the file permissions to the site user who owns the actual folders/files. Also,  when we use the Composer to download Craft, it will automatically assign the permission to the site user.

4. After that, we switch to the project’s root directory and set a security Key by run the following command.

./craft setup/security-key

4. Then, we create a database for the Craft project.

5. Also, we configure a Web Server. So that the site should point to the document root which is web/ directory.

6. Next, we run the following command to run the Setup Wizard.

./craft setup

Now, we should be able to access the new Craft site from the web browser. The sample page shows up as:

For the multisite setup, we can simply create multiple sites under the same Craft CMS. The option to create sites lies under Settings >> Sites >> New site

To enable a unique link for each of the websites, we need to tick the checkbox “This site has its own base URL.”

Further, our Dedicated Engineers replicate sections for each of the websites in Craft CMS.

 

Common problems after setting up multisite via Craft CMS

From our experience in managing servers, we’ve seen customers facing different kinds of problems with craft cms. We’ll now see the top errors and how our Support Team solves them.

 

1. PHP version mismatch

Basically, PHP is one of the most frequently used scripting languages for websites. Also, PHP compatibility is a major problem for craft websites.

Because when we install craft cms, it is necessary to have at least PHP version 7 on the server. Otherwise, it may cause errors like :

Craft requires PHP 7.0 or later. Script @php craft setup/welcome handling the post-create-project-cmd event returned with error code 1

 

The above errors showed up when the customer ran the command to./craft setup/security-key set up a security key.

Therefore, our Support Engineers solved the error by changing the default PHP version of the domain to PHP 7. This can be done either from the control panel or via the command line.

For example, control panels like cPanel, Plesk, DirectAdmin, and Interworx gives a quick option to set the desired PHP version on websites.

 

2. Database error

Recently, one of our customers had a problem while installing Craft cms on the server. He was getting an error while installing craft. Also, the error said,

Database Connection Error – craft\errors\DbConnectException
Craft CMS can’t connect to the database with the credentials in config/db.php.

On checking, our Support Engineers found that the user’s database settings in file .env was incorrect. He had set up the MySQL server as DB_SERVER=”localhost”. However, his MySQL was listening to the internal IP address. So, we changed the settings of DB_SERVER =”localhost” to DB_SERVER = “internal IP”.

This fixed the problem and Craft CMS started loading fine.

 

[Having trouble while setting up craft cms multisite? We’ll fix it for you.]

 

Conclusion

In short, Craft CMS multisite option allows the managing of multiple websites through a single Craft 3 install. Today, we saw how our Support Engineers set up multisite in craft cms and fix related errors.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Categories

Tags

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF