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
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
Dev log
Create a custom log function in PHP
A small PHP function that writes timestamped messages and arrays to a log file you choose. Plus where I keep that file, and what never to log.
4 min read
Dev log
Redirect logged-out users in PHP and WordPress
Send visitors who are not signed in to the login page. A safe session check in plain PHP, and the WordPress way with is_user_logged_in() and auth_redirect().
3 min read