Add and install PHP to macOS Monterey 12 with Homebrew
The latest macOS version Monterey 12 has removed PHP altogether from its operating system, there is a comment in the Apache config file httpd.conf that says: #PHP was deprecated in macOS 11 and removed from macOS 12 Fortunately you can install PHP and all the different PHP versions including 5.7, 7.4 and 8 with some…
Read MoreSet up Virtual Hosts on macOS Big Sur 11 in Apache
Setting up Virtual Hosts in Apache on on macOS Big Sur is straight forward after you have your local Web Development environment up and running – get your web development up and running first including Apache, PHP and MySQL on macOS following this macOS Big Sur Apache/PHP/MySQL guide here if required. This guide will also…
Read MoreInstalling & Configuring Apache on macOS using Homebrew and use Sites folder
Eventhough Apache ships with macOS, a better maintained version would be coming from Homebrew, also Apple is making noises about not supporting legacy software like PHP so in the future this may be more of a compulsory option. macOS use to ship with both MySQL & PHP, but now since macOS Monterey, PHP has also…
Read MoreUpdating to PHP versions 7.4 and 8 on macOS 11 Big Sur and Catalina
The latest macOS versions of Big Sur and Catalina currently ship with PHP 7.3 and have a deprecation notice that they intend to drop support for PHP altogether in a future upgrade. You can see this by running a <? phpinfo(); ?> function in a webhosted file or running php -v on the command line.…
Read MoreInstall Apache, MySQL, PHP on macOS 11 Big Sur and earlier macOS
Get your Local Web Development Environment Up & Running on macOS Big Sur 11 and Catalina 10.15 With Apples’ new macOS Big Sur 11 available for download, here is how to get the AMP stack up and running on the new macOS. This tutorial will go through the process of getting Apache, MySQL, PHP (or…
Read MoreAdding Expires Header to htaccess
Expires Headers are a set of rules or directives from a website to tell a user’s local browser to either look in its own cache for files or to request the files off the webserver, the former is better for speed of the web page load and a reduction in the webserver processing. For Apache…
Read MoreTemporarily Turn off Modsec filtering
You can temporarily turn off Modsec filtering by adding a code snippet rule to your .htacces file, this can be helpful if you are triggering a number of rules which are false positives or you are unable to get the rules whitelisted whilst you do your development. Add into .htaccess <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST…
Read MoremacOS Forbidden 403, You don’t have permission to access /~username/ on this server
In macOS if your user personal or document web sharing is not working for a user and is generating a Forbidden 403 error but is OK at the other document root localhost level, the issue may be a configuration file for the user. The higher document root level of http://localhost/ displays “It Works” but when…
Read MoreChange your WordPress site to serve pages over HTTPS/SSL
This is a tutorial to change your WordPress site to serve all content via HTTPS/SSL and it is something that is becoming easier and more affordable but also necessary for site owners. Swapping your site to the secure HTTPS/SSL protocol across the whole website also brings with it a more reputable trust with searchers and a potential SEO boost…
Read MoreRestarting Apache Web Server from the command line macOS or Linux
To restart, start or stop Apache web server from the command line interface using either Linux or macOS, use the commands below, these commands should be executed as the root user otherwise prefix them with ‘sudo‘
Read More