Like the video 🙂 and follow instructions below: ============================== # Install Homebrew if not already installed /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Install Apache brew install httpd # Start Apache brew services start httpd # Install MySQL brew install mysql # Start MySQL service brew services start mysql # Secure MySQL installation (follow prompts) mysql_secure_installation # Log in to MySQL mysql -u root -p # Create a WordPress database CREATE DATABASE wordpress; # Create a user for WordPress with a password (replace 'your_password' with a strong password) CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'your_password'; # Grant privileges to the user for the WordPress database GRANT ALL PRIVILEGES ON wordpress.* TO 'wp_user'@'localhost'; # Flush privileges to ensure the changes take effect FLUSH PRIVILEGES; # Exit MySQL EXIT; # Create the www directory sudo mkdir -p /usr/local/var/www # Set permissions for the www directory sudo chown -R $(whoami) /usr/local/var/www # Navigate into the www directory cd /usr/local/var/www # Download and extract WordPress curl -O https://wordpress.org/latest.tar.gz tar -xvzf latest.tar.gz rm latest.tar.gz # Set permissions for the WordPress folder sudo chown -R $(whoami):admin /usr/local/var/www/wordpress # Edit Apache configuration to include WordPress sudo nano /usr/local/etc/httpd/httpd.conf # (Uncomment Include /usr/local/etc/httpd/wordpress.conf) # Create the WordPress config file sudo nano /usr/local/etc/httpd/wordpress.conf # Add VirtualHost configuration # NOTE YOUTUBE DOES NOT ALLOW ANGLED BRACKETS # REPLACE [ and ] with ANGLE BRACKETS IN SECTION BELOW: [VirtualHost *:80] ServerName localhost DocumentRoot "/usr/local/var/www/wordpress" [Directory "/usr/local/var/www/wordpress"] AllowOverride All Require all granted [/Directory] [/VirtualHost] # Restart Apache to apply changes sudo apachectl restart # Open browser to access WordPress open http://localhost/wordpress How to install wordpress on localhost on a mac os via command line terminal, without the installer, install wordpress macos #wordpress #wordpresstutorial Timestamps: ================== 00:00 how to install wordpress locally on Mac (terminal command line) 00:08 brew install httpd 00:14 sudo brew services start httpd 00:26 brew install mysql 00:32 mysql_secure_installation 00:45 how to enter mysql prompt as root user 00:47 create database wordpress 01:05 create user localhost password 01:14 grant all privileges for new user 01:20 flush privileges 01:28 brew install php 01:33 brew services start php locally 01:45 make www directory for wordpress 02:00 install wordpress on Mac OS in terminal 02:11 change permissions of wordpress folder 02:18 sudo nano wordpress configuration file 02:40 create and open httpd configuration file 02:54 sudo apachectl restart to start wordpress localhost