VI cheatsheet

Basic Usage vim or vi Run vim and open the given filename. :w Save file. :x or SHIFT ZZ Save and exit. :q Exit if no changes have been made. :q! Exit and undo any changes made. :set nu Display line numbers. Entering Insert mode i At the cursor. a After the cursor. I Before

VI cheatsheet Read More »

Clean up after action scheduler

Sometimes the action scheduler can create huge database files that affect the performance of WordPress, and intervention is required. These queries can help clean up these tables. Remove all rows from the table wp_actionscheduler_actions that contain the statuses complete, failed, or canceled:   Clean up the log files:   Add to functions.php to change the

Clean up after action scheduler Read More »

Server Settings After Initial Setup

SSH Keys for Authentication ssh-keygen has already been run on the local computer, just need to add it to the new server. Use the following command to copy authentication to the new server: Make sure common apps are installed on the server Setup AutoMySQLBackup config file location: /etc/default/automysqlbackup default database backup location: /var/lib/automysqlbackup

Server Settings After Initial Setup Read More »

Secret WordPress Settings Page

WordPress has a secret options page to update values in the options table. Access it by changing the options page URL from /options-general.php to /options.php. I have found this useful for updating the admin email address since they have an authorization feature now.  This let me skirt this feature for making a change to the

Secret WordPress Settings Page Read More »

Modifying Print Invoices and Packing Lists Template in Woocommerce

Modifying “Print Invoices & Packing Lists” WooCommerce add-on to remove unwanted columns.  This will remove the sku column from the invoice, and the weights column from the packing list.  The weight column was the primary reason for this code, and makes it simple to eliminate unwanted information. source: https://www.skyverge.com/blog/modifying-print-invoices-packing-lists-templates/

Modifying Print Invoices and Packing Lists Template in Woocommerce Read More »

Fun With Dates

Working with dates in PHP can get cumbersome. Especially when you need to calculate a date occurrence in the past or future. These examples should help get those dates, and output them in a human readable format. PHP Date Formatting Y 4 digit year (2018) y 2 digit year (18) F Long month (January) M

Fun With Dates Read More »

Scroll to Top