Find and delete files greater than a given size from the Linux command line

The find command available in GNU/Linux shells is a versatile tool for finding files matching the given conditions in a folder and performing a specific action on the files found. The following command will find all files greater than 1M size in your current folder and ask you if you would like to delete the[…]

How to change WordPress default email’s From name and address

You are probably reading this post because have already noticed, that every time someone submitted a comment on your blog, signed up as a user or did anything that required WordPress to generate and send an email, by default the “From Name” in that message appeared as “WordPress” and “From” address was “wordpress@your-domain.com”. If this[…]

WooCommerce – Allow only one product in Cart

This snippet can be used for many ways. For instance, your store only allows to buy one product at a time such as “Buy Now”. Open functions.php under your activated theme and put the code below: // Only one product in cart add_filter( ‘woocommerce_add_cart_item_data’, ‘only_one_product_in_cart’ ); function only_one_product_in_cart( $cart_item_data ) { global $woocommerce; $woocommerce->cart->empty_cart(); return[…]

Bounced Message “retry time not reached for any host after a long failure period” in WHM/cPanel

If you receive complaints from people sending mail to you with the following error “retry time not reached for any host after a long failure period”, it is likely due to an error with the server sending mail at their end. The Exim Retry Database has likely become corrupt and would need to be fixed[…]

Customised WordPress Admin Filters in the backoffice

Creating the Select Drop Down Using the ‘restrict_manage_posts’ Filter The first thing that needs to be done is the creation of the select drop down for the two additional filters we will be making. You will need to navigate over to your child themes functions.php file (or another applicable file) and add code which will[…]

How to change maximum email size in cPanel/WHM

How to change maximum email size in cPanel/WHM There is no max file size limit that can be sent and received, however, cPanel defaults the limit to 50mb. You can change this in cPanel. To change this do the following, Login to cPanel as admin Under Service Configuration, Click “exim Configuration Manager” Click “Advanced Editor”[…]

WooCommerce – Redirect to a custom page after logging out

By default, WooCommerce will redirect customers to the My Account page after logging out. However, you may want them to go somewhere else – here’s how. Firstly, you’ll need to make sure that you are overriding the default WooCommerce template files in your theme. If you’ve already got a woocommerce folder in your theme’s directory,[…]

WooCommerce – Redirect to a custom page after logging in based on the user role

By default WooCommerce redirects the user to the My Account page after a successful login. You may change this and use a custom URL based on the user role, like the Dashboard for admins and My Account page for customers. To do this, add this code at the end of the file functions.php located in[…]

WooCommerce – Redirect to a custom page after logging in for All Users

Sometimes you may want to send users to a unique or custom URL after logging in through WooCommerce. No need for additional plugins or complicated code. Just add the following code to the custom functions area of your functions.php file. // Custom redirect for users after logging in add_filter(‘woocommerce_login_redirect’, ‘wcs_login_redirect’); function wcs_login_redirect( $redirect ) {[…]