website

My New Hugo Site created in WSL 2 on WIndows 10

Hugo development environment in WSL 2

This post helps you in setting up an not-so-standard (but fun) development environment for your static site created in Hugo. This was how to install and configure Hugo for static site development in WSL on Windows 11/10.

AppCmd introduction and examples

AppCmd.exe is a command-line utility to manage Windows Server IIS 7+ web servers. The AppCmd command is your one-stop-shop for administering Windows Server IIS web servers. In combination with WinRM it’s your Swiss Army knife for your daily routine. This post introduces appcmd and provides you with a lot of helpful appcmd examples.

PHP 5.6 default_charset change may break HTML output

An important note for everyone who’s upgrading from PHP 5.4 and PHP 5.5 to PHP 5.6: the PHP default_charset in php.ini changed from “empty” to UTF-8, often breaking sites after upgradiong from PHP 5.4 and PHP 5.5 to PHP 5.6. UTF-8 encoding breaks when upgrading PHP 5.6 to PHP 7.0. Fix
PHP with ini_set( ‘default_charset’, “” ); or in your php.ini with default_charset = “”.

HTTPS for WordPress

Redirect HTTP to HTTPS

In this post I provide you various HTTP to HTTPS redirection methods, for Windows Server IIS and Linux Apache. In web.config and .htaccess. Use these examples to your advantage to secure the traffic between your visitors and your website.

black traffic light under blue sky

Redirect old URL to new URL or send 404 page with PHP

Redirect pages with PHP. If you’ve moved some old PHP pages, or URLs, to new pages and URLs, you can use the following PHP code snippet to easily redirect all visitors and incoming requests to the new location. This PHP code snippet uses a 301 Moved Permanently redirect, perfect for SEO.

Microsoft Internet Information Services logo

Conditionally start Application Pools on remote IIS web servers

Here is how to start stopped application pools on IIS with AppCmd or PowerShell in a loop.

In my routine, I occasionally have to start multiple website application pools when they are in a stopped state. On more than one web server. Being a lazy system administrator, I find it too much work to log on every server. Therefore I start those application pools in a loop. A condition for me to start application pools is that the IIS ApplicationPool.AutoStart Property is set to true. This is because I set autostart to false when I disable hacked websites, and those application pools may not be started until all problems are resolved of course.

Check website availability with PHP and cURL

Perform a PHP cURL request to check if your website is up or not. Verify your website’s online status and availability using just PHP. This script comes in handy because website uptime and availability is important, and you want your website to be always online available. If your website is down, it’ll send you an email to notify you about downtime.

Joomla ACL decision flow-chart

8 Tips to improve Joomla performance

Speed-up Joomla with just a few config settings: 8 Tips to improve Joomla performance. Add caching, gzip compression, set your sessions & optimize MySQL database functions… Provide your visitors with a blazing fast Joomla website!