Installing Drupal 7 on Mac OS X 10.13 (High Sierra)
Apache and PHP installation
Follow the instructions from https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions
The article also gives instructions to install multiple PHP versions and switch versions.
Just in case the domain is not available, the article is exported as pdf and attached.
Mysql installation
The following instruction assumes that you want to install specific version of mysql.
Download "MySQL Community Server 5.7.23" from https://dev.mysql.com/downloads/mysql/5.7.html#downloads
Follow the installation instructions at https://dev.mysql.com/doc/refman/5.7/en/osx-installation-pkg.html
Note: If you choose "Launchd Support" then it might be possible that starting/stopping mysql via command line is does not work. If you don't choose it then you can use following commands in command line.
sudo /usr/local/mysql/support-files/mysql.server start
sudo /usr/local/mysql/support-files/mysql.server stop
sudo /usr/local/mysql/support-files/mysql.server status
Reference: https://apple.stackexchange.com/questions/255671/error-mysql-server-pid-...
Install Drupal
Follow the instructions from https://www.drupal.org/docs/7/install
Optional setup related to development
Composer
Composer is a cross-platform dependency manager for PHP libraries.
brew install composer
Alternatively: https://getcomposer.org/download/
Test
composer --version
Drush8
Drush is a command line shell and Unix scripting interface for Drupal.
composer global require drush/drush:8.*
export PATH="$HOME/.composer/vendor/bin:$PATH"
Add the above line (export PATH) to your bash_profile and refresh it.
Detailed guide: http://docs.drush.org/en/8.x/install/
Test
drush --version
PHPCodeSniffer
Parses PHP, JavaScript and CSS files for violations of Drupal coding standards.
Install phpcodesniffer
brew install php-code-sniffer
Test:
phpcs --version
Install coder
composer global require drupal/coder
Set installed path
phpcs --config-set installed_paths ~/.composer/vendor/drupal/coder/coder_sniffer
Run
https://www.drupal.org/node/1587138
Detailed guide: https://www.drupal.org/node/1419988
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion