![]() Next, use your favorite Mac MySQL client and create a new table called wordpress. brew install mysqlĪlternatively, you can download and install it manually: Mac installing MySQL. Of course, we'll also need a database, so let's make sure MySQL is installed or installed. To read more, check out Making htaccess work on Mac OS X. old: #LoadModule rewrite_module libexec/apache2/mod_rewrite.so new: LoadModule rewrite_module libexec/apache2/mod_rewrite.so Now let's enable mod_rewrite, so our htaccess will work once we have that setup.Īnd uncomment the following line. sudo nano /etc/hostsĪnd add the following line: 127.0.0.1 v Rewrite and htaccess Now we have our domain setup, but nothing is pointing to it yet. Next, set the ServerName to the URL you want to serve it on. For me, it's a www folder at my user level. You have to set the DocumentRoot to your own directory on your local machine. DocumentRoot "/Users/chrisbongers/www/wordpress" ServerName v AllowOverride All Require all granted sudo nano /etc/apache2/vhosts/nfĪnd place the following content in it. Let's go ahead and create the config file. This will make sure we can use a new config for this virtual host.įor more information, check out Mac OS X setting up Virtual Hosts #Include /private/etc/apache2/extra/nf Include /private/etc/apache2/vhosts/*.conf Look for the following line, and place the new line under it. The next thing we need to set up is a virtual host.įirstly let's enable it in our nf file. old: # LoadModule php7_module libexec/apache2/libphp7.so new: LoadModule php7_module libexec/apache2/libphp7.so Apache vhost Search ( CTRL + W) and remove the # before the php7_module line. Open up the nf file by running: sudo nano /etc/apache2/nf Once you have a version you're happy with, we have to enable apache to use it. This is not a needed step, so check out my article on updating the PHP version on Mac OS X. However, you might want to update the version. Nowadays, your Mac will come with PHP installed. You might be thinking, wow, that's a lot of stuff, but your Mac will come with most of this stuff pre-installed. ![]() The elements we need to run a WordPress installation locally are as follows: However, in this article, I'll guide you on setting it up locally. I used to do a lot of WordPress development and always had to leverage MAMP/XAMP for this. Today we'll learn how to run a WordPress installation on our Mac OS X system. Step by step guide installing WordPress on Mac OS X 11 Jun, 2021 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |