![]() You will need to know the database username, password, and database name. This will be the username and password for your new site's database, so make a note of this because you will be re-entering this information into your site's settings.php file. Type and confirm a password into the Password field. Type in a new username in the text field box and set the host to localhost. Now load your main phpMyAdmin screen and click on the Privileges link.ħ. Click on the Export tab and then select Save as file and click on the GO button.Ĥ. Locate your main site's database and open it.ģ. Then I'll import that data into each new database that I configure. So the first thing I'm going to do is export a clean database dump of the / drupal database and save that locally on my desktop. To do this I'm going to use the same data that my core database contains. We're going to create two new databases (one for each of our new sites). Now we already have a core database for our /drupal folder. site1/files /site2/files Setting up databases for your multisite You must also create / files folders inside each of your site's directories. The reason you do this is that each multisite needs to have its own settings.php configuration file so that you can tell that site what database to work with and also what base_url to use. The next step is to copy your main / sites/default/settings.php file and paste a copy of it into each of your multisite folders. You should now have your folder directory looking like this: So, we're going to add two sites and create the following folders in our ![]() For Drupal multisite, you need to add your site folders into the main core / sites folder. To do this, go to your main /drupal site folder and open the main /sites folder. The first thing we need to do is create folders for each site we want to run. Once we complete the multisite configuration, all three of our Drupal sites will be running from their own database, but they will be sharing the core codebase, core modules, and themes. I'll do this by exporting the data from the core /drupal site's database and importing that data into two new MySQL databases that we're going to create. To make things simple, I'm going to just duplicate this site and use the same content for the two new sites. The next thing we're going to do is configure this core /drupal site to be the core codebase for two new Drupal sites that we're going to install and configure. We also installed a Drupal website in our C:\Our core Drupal site is working smoothly, and in the previous chapter recall that we also configured Memcache API and Authcache to run caching mechanisms on our site. We now have Apache running and we have access to phpMyAdmin to do our database work by going here: phpmyadmin/. When doing this we installed the Apache web server, PHP, and MySQL on our local development environment. You have already prepped your multisite environment in the previous chapter when we set up a Drupal site on our localhost using MoWeS Portable applications. ![]() First let's start by configuring a multisite development environment on our local development environment. We'll also briefly discuss how to best approach setting up multisite environments on production servers including Ubuntu Linux, and using a more common cPanel solution on shared servers. However, these instructions will also work on a Linux system or a MAMP system on Mac OS. I'm going to walk through the steps of setting this up on Windows because there's an additional trick for Windows users to make sure they can get a Drupal multisite environment functioning easily in a Windows development environment. ![]() We are going to configure our Drupal multisite environment on our localhost development server, either on Windows or Linux.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |