To create a custom URL path (route) such as example.com/test/, use the following as a guide. This assumes you already have created a custom module with your three initial files (registration.php, composer.json and etc/module.xml) using a module called YourNamespace_TestRoute. This was written with Magento (Adobe Commerce) version 2.4.5. 1. Create Route Config etc/frontend/routes.xml id=”test” will […]
Install Magento 2 on Mac OSX Running MAMP
Option 1: Install Magento 2 with Composer 1) Install Composer The first step is to install Composer if you haven’t already. 2) Install Magento Run the following to install the version of Magento you would like. In our example below we are installing version 2.3.4. Or run this to install the latest release… 3) Install […]
Cleanup Git Branches Already Merged into Master
Here are some command line statements to help cleanup your branches. Clean remote git branches already merged into master Switch to master, fetch and pull the latest updates from master. List the branches about to be removed. Screen will display vi with list that can be edited and then saved with “:wq” to complete the […]
Add Custom Image Field to WordPress Theme Customizer
To make the theme preview work, in JS in the admin you will need to add… Then to output in your theme you can either output directly using… However, since we are saving this in the DB as an attachment ID, you will probably want to create a template tag function to convert it to […]
Disable WHM Two-Factor Authentication via Command Line
In the event you lose your device or two-factor just isn’t working for whatever reason, you have the ability to disable it by logging into your server via command line as root. Then run the following to disable two-factor authentication… For further options you can review the official documentation… WHM API 1 Functions – twofactorauth_disable_policy
Create Custom URL Paths and Templates in WordPress
If you need to create a custom URL Path (rewrite) it’s easy enough to just create the page in the admin and create a custom shortcode that will output the HTML that you want. However, you would not be able to properly re-theme this output so a preferred method is to create a URL rewrite […]
Install MySQL Time Zone Support on MAMP Pro
To setup the ability to use time zone features in MySQL like CONVERT_TZ(), for example, you need to setup time zone support in your MySQL install. These steps are specifically for MAMP Pro, but will work for any install as long as you change the paths appropriately. Open Terminal Run the following command… [code]/Applications/MAMP/Library/bin/mysql_tzinfo_to_sql /usr/share/zoneinfo/ […]
List Unique IPs that Accessed Linux Server
IPs from Apache access logs… [code]$ cat ./access_log | awk ‘{print $1}’ | sort -n | uniq -c | sort -nr | head -20[/code] IPs that logged into server (via SSH, etc)… [code]$ last[/code]
MAMP Pro Setup
Install Download MAMP Pro and Install Note: all MAMP Pro specific configuration files are in /Library/Application Support/appsolute/MAMP PRO/ Configure PHP Preferences Click the “PHP” section Set default PHP version as desired Enable “Make this version available on the command line” Set “mode” to “Individual PHP version…” Enable the “Xdebug” extension Enable “Log error ‘to screen’” Setup […]
Report SPAM to SpamCop Automatically (almost) on Mac OSX
If you’re email provider uses the SpamCop RLB to help block SPAM coming into your account, then you can use the steps below to more easily report SPAM messages you receive and help reduce it. Setup is a little cumbersome initially, but should be worth it in the end. In my experience, SpamCop reporting really does work. […]
Prevent Duplicate Form Submission with jQuery Validate
To prevent users from accidentally submitting your form multiple times you can add a bit of javascript to track if the form has been submitted and prevent further submits. If you are using the jQuery Validate plugin you can do this via submitHandler.
Transfer Domain from eNom to ResellerClub
These are the steps you can follow to transfer your client’s domains from your eNom account to ResellerClub. eNom Go to Domains > My Domains Click on the domain you want to transfer. Edit “Contact Information” to use an email that you can access (this is temporary for verification purposes so you won’t have to […]