Category: Uncategorized

Get Real Client IP from Cloudflare and pass to Apache or PHP using CF-Connecting-IP and Apache mod

How to Get the Real Client IP Address from Cloudflare in Apache or PHP

In this article we will learn how to get the real client IP from Cloudlfare (CF-Connecting-IP) and pass it on to PHP or Apache with mod_remoteip.

Introduction Cloudflare is great as a quick-and-easy CDN and DDoS protection, but one downside is that the IP address seen by your web server will be that of the Clouflare proxy and not the actual client. This can be a big security issue because your Apache access and error logs will only show the IP…

Continue reading How to Get the Real Client IP Address from Cloudflare in Apache or PHP

WooCommerce wrong attribute sort order

How to Change WooCommerce Variations and Attributes Sort Order

I was recently having an issue where the Size attribute was showing in the wrong order in the dropdown box for my variable product (S, L, M instead of S, M, L).  WooCommerce allows you to control the order that your custom attributes and variations appear in the template either alphabetically, by term ID, or by a completely custom sort order.

Product Attribute/Variation Sort Order Type To change the attribute or variation sort order type alphabetically, by term ID, or a custom sort order: In the left-hand menu, click Products and then click Attributes. On the WooCommerce Attributes page, hover over the attribute you want to change (in this example Size) and click Edit. In the…

Continue reading How to Change WooCommerce Variations and Attributes Sort Order

Create Custom Display Resolution Nvidia GeForce

Nvidia GeForce Resolution Missing? How to Create a Custom Resolution in Windows

If your monitor and graphics card support a higher resolution such as 2560 x 1440 but Windows is not showing anything higher than 1920 x 1080, you may be able to force a higher resolution using the Nvidia Control Panel.

Introduction I recently bought a HP Pavilion Gaming Monitor 32″ QHD (2560 x 1440) and plugged it into my 2011 Sony Vaio laptop with an Nvidia GeForce GT 330M, only to find that the max resolution reported by Windows 10 was 1920 x 1080 ūüė™. The specs for the GeForce GT 330 clearly state the…

Continue reading Nvidia GeForce Resolution Missing? How to Create a Custom Resolution in Windows

How to Install Composer and PHP on Windows 10

How to Install Composer and PHP on Windows 10

In this guide we will install Composer and PHP on Windows 10 so that we can install dependencies for our web apps directly from Windows command line.

1. Download PHP and Visual C++ Go to the Windows PHP download page and download the .zip of the version of PHP you require. In this guide, we are installing PHP 7.3 VC15 x64 Non Thread Safe, which is the latest version as of writing. VC15 is the version of Visual C++ Redistributable for Visual…

Continue reading How to Install Composer and PHP on Windows 10

60% Increase in AdSense Revenue with Ezoic

My Ezoic Review After 1 Month ‚Äď Using AI to Increase Ad Revenue

Ezoic uses artificial intelligence to increase ad earnings by automatically testing different ad types across your site. In this Ezoic review, I will outline my own experience after one month on the platform.

Ezoic Review ‚Äď The Invitation In 2018 I started receiving emails from Ezoic representatives saying they could increase the ad revenue on two of my sites. Sceptical of their claims and too busy with other jobs at the time, I ignored their emails and eventually forgot about it. A year later they emailed me again…

Continue reading My Ezoic Review After 1 Month ‚Äď Using AI to Increase Ad Revenue

Connect your store to WooCommerce.com to receive extensions updates and support.

How to Get Rid of “Connect your store to WooCommerce.com to receive extensions updates and support.”

Method 1: Use a Function A quick fix to get rid of this nag is by using a custom function. Add the following to your functions.php. add_filter( ‘woocommerce_helper_suppress_admin_notices’, ‘__return_true’ ); Just be aware that this may quash other admin messages originating from WooCommerce.¬† Method 2: Use a Plugin I’ve made a simple plugin which will…

Continue reading How to Get Rid of “Connect your store to WooCommerce.com to receive extensions updates and support.”

Search and Replace all URLs and links in WordPress, HTTP to HTTPS

Find and Replace all URLs or Text in a WordPress Database

Whether it’s a domain name change or a transition from HTTP to HTTPS, in this guide we will find and replace URLs (or any text) in your WordPress database using a few different methods.

Prerequisites The best way to find and replace content in your WordPress database is either via phpMyAdmin, shell command line, or a PHP script. Our ethos is not to install plugins unless absolutely necessary, but if you are not comfortable working directly with the database, we have included some plugins at the bottom of the…

Continue reading Find and Replace all URLs or Text in a WordPress Database

PHP setlocale and strftime Not Working

I was recently having problems displaying the day and month name in my local language after a server move. This was due to a missing locale.

If you¬†don’t have shell access to your server, you may need to contact your web host for assistance. Firstly, check which locales are currently installed on the server. locale -a en_US.utf8 Above we can see only en_US.utf8 is installed. If your required locale is missing, you may need to install it using¬†dpkg-reconfigure locales. sudo pkg-reconfigure…

Continue reading PHP setlocale and strftime Not Working

How to Run Multiple PHP Versions with Apache on Ubuntu 18.04 / 16.04

How to Run Multiple PHP Versions with Apache on Ubuntu 18.04 / 16.04

In this guide we will configure Apache to run PHP 7.x and PHP 5.6 simultaneously, and choose between them using Virtual Hosts or .htaccess.

Prerequisites This guide assumes you have Apache already installed and serving web pages.¬†If you need to install Apache, please see: Installing Apache on Ubuntu 18.04 with Virtual Hosts Installing Apache on Ubuntu 16.04 / 17.10 with Virtual Hosts 1.¬†Add Repository Let’s begin by updating the package lists. sudo apt update For¬†Ubuntu 18.04 users, install¬†libapache2-mod-fcgid. sudo…

Continue reading How to Run Multiple PHP Versions with Apache on Ubuntu 18.04 / 16.04

How to Install VNC on Ubuntu 18.04 (Windows, Linux and Mac)

How to Install VNC on Ubuntu 18.04 & 16.04 (Windows, Linux and Mac)

In this guide we will install the xfce4 desktop environment and VNC server to allow us to control Ubuntu 18.04 remotely from Linux, Mac or Windows. This guide has also been tested on Ubuntu 16.04 to Ubuntu 17.10.

Prerequisites You should use a non-root user account with sudo privileges. Please see the¬†Initial Server Setup for Ubuntu 18.04 / 18.10¬†or¬†Initial Server Setup for Ubuntu 16.04 / 17.10 for more details. You will also need to¬†download and install a VNC client for your OS. We recommend the following: Windows VNC Clients VNC Viewer (RealVNC),¬†TightVNC¬†or¬†UltraVNC For…

Continue reading How to Install VNC on Ubuntu 18.04 & 16.04 (Windows, Linux and Mac)