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 Get the Current Category ID in WordPress

WordPress current category ID with get_queried_object on archives, get_the_category on singles, and get_cat_ID by name. Safe guards for non-archive pages.

how7o

How to Check If a User Is Logged In in WordPress

WordPress check user logged in with is_user_logged_in(). Covers nav menu switching, capability checks, and the timing gotcha when calling from…

how7o

How to Login a User Programmatically in WordPress

WordPress login user programmatically with wp_set_current_user + wp_set_auth_cookie — no password needed. Covers the redirect step and the safety rules.

how7o

How to Set a MySQL Variable in Laravel Query Builder Select

Laravel MySQL variable in select: assign with @name := in DB::raw or selectRaw, then reuse. Also covers CTEs for MySQL…

how7o

How to Run a Laravel Project Without a .env File

Laravel run without .env: add env('APP_KEY', 'default') fallback in config/app.php or set real environment variables. For installers, containers, and managed…

how7o

How to Run a Laravel Project from GitHub

Laravel run project from GitHub in 9 steps: composer install, npm install, .env, key:generate, migrate, seed, artisan serve. Plus fixes…

how7o

How to Exclude .well-known from Redirection for Let’s Encrypt in Laravel

Laravel .htaccess well-known exclude for Let's Encrypt: add RewriteCond !^/\.well-known before the public/ rewrite. Covers Apache and nginx, verify +…

how7o

How to Compile Multiple CSS into One CSS with Laravel + Vite

Laravel Vite combine CSS: @import all vendor and app stylesheets from one entry file. Replaces Mix's mix.styles() with zero vite.config.js…

how7o

How to Search Custom or Composite Columns in Laravel DataTables

Laravel DataTables custom column search errors with 'Unknown column'? Use filterColumn() and orderColumn() to attach real SQL to addColumn-built composite…

how7o

How to Add an HTML Column in Laravel DataTables

Laravel DataTables HTML column rendering as text? Use ->rawColumns([...]) to opt columns out of the default escape. XSS safety with…

how7o