Lesson
Deployer, the PHP deployment tool: get started
Deployer puts PHP sites live with no downtime and rolls back with one command. Install it, write a deploy.php, deploy a Laravel or WordPress site and roll back.
3 min read
Field notes
Journal
Notes from the Riksi studio in Melbourne. Plain guides on WordPress, Shopify, front-end code, speed and the tools I use every day.
Lesson
Deployer, the PHP deployment tool: get started
Deployer puts PHP sites live with no downtime and rolls back with one command. Install it, write a deploy.php, deploy a Laravel or WordPress site and roll back.
3 min read
Dev log
How to increase the PHP memory limit (and WordPress too)
Fix "Allowed memory size exhausted" by raising memory_limit in php.ini, .user.ini or .htaccess, or WP_MEMORY_LIMIT in wp-config.php. Then check which one wins.
4 min read
Trick
How to calculate an ex-GST price in Australia
Divide the GST-inclusive price by 1.1 to get the ex-GST price, or divide it by 11 to get the GST. So $110 is $100 plus $10 GST.
4 min read
Dev log
How to add /blog/ to WordPress post URLs
Put /blog/ in front of every post URL with a custom permalink structure. Keep custom post types out of it with with_front, and keep old links working.
3 min read
Trick
Use the Linux command line on Windows 11 and 10 with WSL
Open PowerShell as administrator, run wsl --install and restart. You get Ubuntu with a real bash shell, running alongside Windows.
4 min read
Lesson
MAMP: set up a local site with a virtual host
Give each local project its own address, like mysite.test, in MAMP on a Mac. I turn on virtual hosts, add the site, map the name in /etc/hosts and restart.
3 min read
Lesson
MySQL JOINs explained: INNER, LEFT, RIGHT, FULL, CROSS, self
What each MySQL JOIN returns, shown with two small tables and the real rows that come back. Plus how I build a FULL OUTER JOIN, which MySQL doesn't have.
7 min read
Dev log
Git warning: LF will be replaced by CRLF, and how to fix it
Git is converting line endings, usually because core.autocrlf is true on Windows. It's harmless, and a .gitattributes file fixes it for the whole team.
5 min read
Trick
How to create and use shell aliases on macOS and Linux
An alias turns a long command into a short one, like alias ll='ls -lah'. Add it to ~/.zshrc on a Mac or ~/.bashrc on Linux to keep it for good.
4 min read
Trick
How to kill a process using a TCP port on Mac
Find what's holding the port with lsof -nP -iTCP:8000 -sTCP:LISTEN, then stop it with kill PID. I keep kill -9 as a last resort.
4 min read