Updating 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 MoreBlock xmlrpc.php and wp-login.php via NGINX
You can block xmlrpc.php and wp-login.php via NGINX with the configurations below, what’s good about this approach is that it prevents brute force attacks at the NGINX server level without any PHP/MySQL resources being used. xmlrpc.php for NGINX location = /xmlrpc.php { deny all; } To allow JetPacks IP addresses through adjust the config to…
Read MoreSet hostname and fqdn in Ubuntu 18.04 & 20.04 & 22.04
Hostname in Ubuntu 18.04 & 20.04 & 22.04 You can find and change the hostname with the commands hostname or hostnamectl in Ubuntu 18.04 & 20.04, if you run the command on its own it will tell you what the current name is, the example below is named racknerd-la hostnamectl root@racknerd-la:~# hostnamectl Static hostname: racknerd-la…
Read More