It’s recommended to disallow access to and execution of PHP files in wp-content/uploads folder. Preferably without the use of a security plugin. Blocking access to PHP files in WordPress wp-content/uploads folder is easily achieved with a .htaccess file on Linux Apache, or web.config accesssPolicy in Windows Server IIS, and here is how.
Create a random string in Bash easily. You can use this Bash function in your .bashrc file to generate a random alphanumeric string. This comes in handy when you need to generate a long, secure password for example. Adjust to your needs.
Using the Windows Management Infrastructure, or WMI, Windows admins can create filters to apply GPOs more granular on specific versions of Windows Server. In this post I provide some basic examples. Example WMI filters for you to use in Group Policy Objects (GPOs) to target and manage specific Windows Server versions like 2012R2, 2016, 2019 and Windows Server 2022.
Basic Authentication managed HTTP module for IIS 10 with virtual users support. In my pursuit of a basic authentication alternative in IIS, other than the built-in Basic Authentication module or Helicon Ape, I came across Devbridge AzurePowerTools. It’s apparently one of few HTTP managed modules for IIS that enables HTTP Basic Authentication with support for virtual users.
In this post I’ll show you how to configure an IP whitelist for IIS FTP Server using PowerShell iisadministration and webadministration modules
how to remove phantom application folders from websites in IIS using PowerShell? Today I wanted to remove application folders from the website configuration in IIS whose physical path on the filesystem was removed. E.g when the application folder “/test1” in the website example.com should point to z:\sites\example.com\www\test1 but was removed. Here is now.
Here is how to change the Akismet interval to three days instead of 15 days for deleting spam comments using the akismet_delete_comment_interval filter
How to easily create the backup of IIS websites, application pools and configuration and restore them, using appcmd or PowerShell.
How to fix System.Collections.Generic.KeyNotFoundException “The given key was not present in the dictionary” Exception with MySQL Connector/NET and utf8mb4 character set
An System.Collections.Generic.KeyNotFoundException “The given key was not present in the dictionary” can be the result of using a too old MySQL Connector/NET version in your ASP.NET web application.
Whenever WordPress is using a lot of CPU and you have Wordfence Security plugin enabled, it is recommended to double check some settings. Unfortunately the Wordfence “Live Traffic Options” (“Traffic logging mode”) feature can cause high CPU usage and load issues for WordPress websites. Therefore, I recommend you disable this feature to improve the performance of your WordPress website.
Using -SeachBase with PowerShell’s Get-ADComputer cmdlet gives faster results when querying Active Directory Domain Services (AD DS) with PowerShell. You can use this for your own advantage, here is a little example to speed up AD DS queries.
Install Servicing Stack Updates (SSU) for Windows Server 2012R2, 2016 and Windows Server 2019 using PowerShell, without downtime. Because they must be installed prior to your normal Windows Server security updates, you can install them anytime you want to during the day. Here’s a small PowerShell example to do so.
Did you know you can automatically flush opcode caches like Redis when you publishing a post or page in WordPress? Doing so ensures you and your visitors see the newly created content immediately. No more stale / cached content in WP
How to install and configure Monit monitoring in Windows 10 WSL. Set up a Monit monitoring service for your websites and services. A couple of years ago, I wrote a blog article about setting up Monit monitoring on an Ubuntu VM on Hyper-V. Now it’s time to do the same, but then in Windows Subsystem for Linux, or WSL. For this, I use Ubuntu.
Learn how to silently import a .reg file into your Windows Registry. This neat regedit trick comes in handy quite often. The regedit command is valid for Windows 11, 10, Windows Server 2022, 2019 and older