Tutorials for Developers & Sysadmins

Step-by-step guides for the work we actually do — Laravel, PHP, WordPress, MySQL, Linux servers, and the occasional rabbit hole. Every command has been run on a real machine; nothing is theoretical.

How to Run a Node.js Application from a Windows .bat File

Run a Node.js application from a Windows .bat file — npm start in a one-line script, plus a robust 'cd…

how7o

How to Run a Cron Job as a Non-Root User

Run a cron job as a non-root user with crontab -e (per user), sudo crontab -u username -e (from root),…

how7o

How to Reset the LiteSpeed WebAdmin Console Password

Reset the LiteSpeed WebAdmin Console password by running /usr/local/lsws/admin/misc/admpass.sh as root. Change takes effect immediately — no service restart needed.

how7o

How to Replace Strings in a MySQL Database

Replace strings in a MySQL database with UPDATE + REPLACE(col, 'old', 'new'). Includes WordPress example, REGEXP_REPLACE pattern variant, and the…

how7o

How to Rename Menu Items on the WooCommerce My Account Page

Rename WooCommerce My Account menu items with the woocommerce_account_menu_items filter. Includes default keys, reordering, removing, and a debug dump pattern.

how7o

How to Remove Unwanted Characters from a String in PHP

Remove unwanted characters from a PHP string with preg_replace and a negated character class. Includes URL-slug pattern and Unicode-safe \p{L}\p{N}…

how7o

How to Safely Clean Up MySQL Binary Log Files

Safely clean up MySQL binary log files (mysql-bin.*) with PURGE BINARY LOGS — never rm them directly. Includes replica-safety check…

how7o

How to Remove MariaDB Completely from RHEL/CentOS

Completely remove MariaDB on RHEL, AlmaLinux, Rocky, or CentOS: stop the service, dnf/yum remove, delete /var/lib/mysql and /etc/my.cnf, then optionally…

how7o

How to Remove All Non-Numeric Characters from a String in PHP

Remove all non-numeric characters from a PHP string with preg_replace('/\D/', '', $str) or filter_var($str, FILTER_SANITIZE_NUMBER_INT). Includes decimal & sign variants.

how7o

How to Reload DataTables with a New Ajax URL

Reload DataTables with a new Ajax URL without reinitializing — table.ajax.url('new-endpoint').load(). Includes preserve-page reload and ajax.data filter pattern.

how7o