Introduction
Drupal is a free and open source content management framework which is based on PHP. It is distributed under the open source GNU General Public License. As of November 2017, Drupal community is composed of more than 1.3 million members.
In this tutorial, we will learn the process involved in installing Drupal on MacOS.
Drush can be installed on a Mac using the Homebrew package manager, or manually using the following steps. Download and unpack Drush Download either the tar.gz or zip file from the Drush project page and unpack it into your home directory or a directory below your home directory. For example, if your home directory is /Users/myusername, unpacking the tar.gz or zip file there will create a. Drupal 7 was launched by Drupal organization. There are many features and improvements that have been released with the release of Drupal 7 for both the developers and users for the efficient use of this content management system. Bitnami Drupal Stack Virtual Machines Bitnami Virtual Machines contain a minimal Linux operating system with Drupal installed and configured. Using the Bitnami Virtual Machine image requires hypervisor software such as VMware Player or VirtualBox.Both of these hypervisors are available free of charge.
Prerequisites
- Mac Operating system
- Proper functioning MySQL
- PHP version 5.x or greater
Installation
There are following steps by which we can install Drupal on our MacOS.
1) Download the archived file
Download the archived file (.tar.gz) by visiting the official website of Drupal or by clicking the link https://ftp.drupal.org/files/projects/drupal-8.4.3.tar.gz.
2) Extract the file
The downloaded file needs to be extracted. To extract the file use the following command:
3) Create database
We need to create the database in order to run Drupal on our computer. Start MySQL and type the following command:
Where root is the username and password is the password.
4) Start the development server
Change the directory to the directory where Drupal is installed and run the following command:
5) Accessing and Installing Drupal on localhost
Just type localhost:8080 on the browser's bar to access Drupal on the browser.
Click on save and continue to goto the next step.
The window prompts to choose a profile. Choose the standard profile and click save and continue.
In next step window prompts to fill the database details. As we have created database named as Drupal for this purpose, just fill the name, username (in my case it is root) and password (in my case it is 123) and click save and continue.
Drupal started installing itself on our local machine when we fill the required database details. Let this finish first.
Now Drupal is installed on our machine. In this step, we configure the website information such as its title, email address, username, password, etc. Just fill out all the details.
When we fill out all the details, we press save and continue. This will complete the installation Process. Browser will show a welcome message like following.
Well, we have installed Drupal on MacOS. Now we can make and customize our content and websites with Drupal.
Next TopicHow to Install Codeigniter on Mac
Fastest Way to install the latest Drupal 7 version on Mac OS X Mavericks 10.9 or 10.8
Drupal is a quality CMS application and is as simple or complex as your needs vary, it runs on the same foundations that Mac OS X Mavericks or Mountain Lion, Lion or Snow Leopard provides similar to a Linux environment.
This tutorial assumes a certain degree of comfort in the command line application (in the Utilities folder) Terminal for installing Drupal 7 on Mac OS X Lion or Snow Leopard but if the instructions below are followed correctly it will get the job done easily. If you would rather have a point and click install – follow the Drupal OSX guide here.
Before proceeding Drupal needs a couple of things to get going and those things are what is called an AMP stack – Apache, MySQL and PHP. Apache and PHP already come bundled in OS X and just need to be enabled but MySQL needs to be downloaded and configured, luckily a point and click installer is provided.
Optionally and preferably also install phpmyadmin to manage the database from a browser. To get the AMP stack working correctly on OS X follow this guide on Apache/MySQL/PHP and for phpMyAdmin if required. Once these components are in place you are OK to proceed. Or you may already have an AMP stack by using MAMP or XAMPP.
OS X has 2 web document roots ‘/Library/WebServer/Documents’ and ‘/Users/username/Sites/’ also known as ‘~/Sites’ this guide uses ‘~/Sites’. This tutorial assumes that the shared drupal directory will be called “drupal“. The mysql database will be called drupal and the mysql user is root.
Drupal Download and Configure
Make a sharing directory and move into it:
get the latest drupal, swap 7.x for incremental updates[
expand it
move all files into shared directory one level up
move hidden files one level up
remove compressed archive and empty directory
create a settings file
fix permissions on the default directory and settings file
Download Drupal 7 For Mac
Create the Drupal Database
create a new database (no space between -p and password – as an alternative this can be done in phpmyadmin
or in phpMyAdmin
Finish the Drupal Install
Open – http://localhost/~username/drupal/
All done! faster than you can say “bitnami” If this is your first time installing Drupal, go with the Standard option
Then when you get to the Database configuration put in the details you used to set up MySQL in this case the db was “drupal” and the db user was “root”. In the advanced options you can tweak the db prefix, port and host, the default “localhost” should be fine for this purpose.
Next steps are to create a master admin account and a few generic system settings and you are done.
Post Installation Tips
As a foot note, to sort out clean URLs, the .htaccess needs a tweak as the install is in a subdirectory, the “RewriteBase” needs to be explicitly set:
And also for smoother compatibilities for Drupal upgrades and module/theme add on installs change the local ownership to _www on your drupal web shared directory
Drupal 7 Form_validate
Upgrading Drupal
Drupal 7 Machine Name
To upgrade an incremental version of Drupal – say from 7.12 to 7.26, you download the new core base files and replace the current files in the web root apart from the Sites directory, and if customized, also the .htaccess file.
After replacing the files run a database update: http://mydomain.com/update.php or from within Drupal Admin > Reports > Available Updates > Update to patch any software.
Thats it Drupal should be up and running!