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 MoreFind out how many inodes you are using on a hard disk or in a directory?
Inodes are like pseudo files that manage the metadata about the actual files and folders on the filing system, they don’t have any data in them. Most hosting plans have a limitation on inodes – so you need to know how many inodes there are and where they are being used if you need to…
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 MoreFinding the Large Files on a Linux/Ubuntu Server
Reducing space on a server is a never ending task, taking out the big unnecessary large files will speed up the process. A bloated log is an example of files that may be building up on your limited disk space. This command run on Linux: CentOS, Red Hat, Fedora and Ubuntu via command line will…
Read MoreRestart Start Stop MySQL Server from Command Line, macOS, Linux
To restart, start or stop MySQL or mariadb database servers from the command line, type the following at the shell prompt… On Linux start/stop/restart from the command line: /etc/init.d/mysqld start /etc/init.d/mysqld stop /etc/init.d/mysqld restart Some Linux flavors offer the service command too service mysqld start service mysqld stop service mysqld restart or service mysql start…
Read MoreRedirecting a Web Folder Directory to another Directory in htaccess
Redirecting within the same domain Using htaccess in your root level of your web server, how you redirect one page to another is: RewriteRule ^url-string-to-redirect$ http://www.yourdomain.com/your-new-url-string [R=301,L]
Read MoreSet up Cache Warming on RunCloud with Optimus Prime
Here is a tutorial on adding a cache warming tool: Optimus Prime on a RunCloud instance, your site will need to have an xml sitemap similar to the one provided by Yoast WordPress SEO. RunCloud also has preloading as an option in their Runcache plugin, the Optimus Prime cache warmer can help when that is…
Read MoreSearch for multiple IP addresses in webserver log
To search for an IP address in a server log, grep is a tool to do it. To search for a single IP address, you need to know where the log file is then either navigate to it or use an absolute path, if you are already in the correct directory use grep like so……
Read MoreCache warming a website with Optimus Prime
Not all cache plugins or apps preload pages or provide a warm cache of all content, normally the first time a page is visited it is not cached but subsequent pages are. More plugins are providing pre-loading or warm cache solutions but some still don’t or web hosts don’t allow it – there are a…
Read MoreForce Password on SSH Connection
This is the command to force a SSH password between a client and server, you may have passwordless connection set up with SSH keys but want to check that a password is correct. ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no [email protected] Swap out [email protected] with your connection details. Once logged in, if you want to change the…
Read More