Fatal Error Wordfence Test

default memory only mistake

Our customer experienced an error using Amelia Forms. It would not load properly even though we had added its scripts to the exception list in WP Rocket. So we decided to investigate. The only errors in logs we found were from yesterday and were not related to Amelia but to Wordfence. It seemed it did […]

Body Tag User Role

Sometimes you want to add a body tag for a specific user role. This as you want to hide or show specific parts of a page, or site for a particular user. Here is how you can do just that. add_filter( ‘body_class’, ‘imwz_role__body_class’ ); function imwz_role__body_class( $classes ) { $user = wp_get_current_user(); if ( in_array( […]

Assign Specific Role on Registration

Sometimes you need a custom registration form. A registration form where more fields can be added and where you can assign a specific role based on user input. Plugin Registration Better to put the to be added code in a mu-plugins plugin instead of the theme’s function.php. So let’s start with that. <?php /* Plugin […]

Apply Filter to Specific User

What if you need to apply a certain filter for a certain user? What could you do to achieve this? Well, there is too things we would have to look at. The user we want to work with and the filter to use. User Capabilities Add User Role User Capabilities Check if user has a […]

Redirect Certain Categories to new site

Sometimes you want to redirect posts in certain categories to a new location / domain name. You do not want to redirect the entire website to a new website, but only part of it. This because you perhaps split up your website into multiple websites. Well you are in luck. With WordPress this is possible […]

Block Password Recovery Attacks

Been annoyed by the recent barrage of brute force password recovery attacks. In WordPress you can block these kind of attacks by turning off password recovery. Now this is obviously not for everyone as you will not be able to reset your password if you ever lose it. And that would mean adjusting the code […]

WordPress Setup Digital Ocean

Digital Ocean Account Setup To work with Digital Ocean you need an account. It can be one run by developer, but preferably one client runs and to which he invites you as a developer and or DevOps. So you need the following for starters Setup of account by client with DO Team Setup with access […]

New WordPress Admin User w/ PHP

To add a New WordPress Admin User w/ PHP you can tweak the database, but you can also simply do it with PHP code. I prefer the latter as I am better at PHP than MySQL and as messing with the database once a site is up is always tricky. PHP Snippet Here is a […]

Laravel Valet Nginx 502 errors

Sometimes your WordPress website won’t load properly in Laravel Valet. You keep on getting Laravel Valet Nginx 502 errors. What can be done about it? Telltale Signs In your .valet/Log/nginx-error.log  you will see something like: HTTP/2.0″, upstream 2018/07/24 09:18:54 [error] 15573#0: *328 upstream sent too big header while reading response header from upstream, client:, server: That means […]

Digital Ocean Volume for WordPress Media

Adding Digital Ocean Volume for WordPress Media can be very useful. Especially if you have a lot of images and or other media and need a cheap way to store them. Block Storage at Digital Ocean is fast and easy to work with. It allows you to get a cheap Droplet and add cheap storage. […]