≡ Menu

T he following Exim mail servers error was encountered while sending out mails. The original error was experienced by Gravity Forms WordPress plugin. However, I was able to test it out by using command line to rule out the plugin.

someone@domain.com R=virtual_aliases: No Such User Here

The debug message I received via Gravity Forms is the following. This confirms the mail has been passed on from WordPress to the mail server.

2016-03-25 11:06:04.042599 - DEBUG --> GFCommon::send_email(): Result from wp_mail(): 1
2016-03-25 11:06:04.042748 - DEBUG --> GFCommon::send_email(): Mail was passed from WordPress to the mail server.
2016-03-25 11:06:04.153172 - DEBUG --> GFFormDisplay::handle_confirmation(): Sending confirmation.

Before I go any further, I would like to give some background information on domain.com, which the following aspects are hosted as below.

[click to continue…]

How to restrict WordPress login to specific IPs

This involves adding the following code to the .htaccess file within the root of the WordPress installation directory and add each IP addresses to a new line and IP subnet in the CIDR format.

The below code is displayed as an image due to WordPress limitation.

Screen Shot 08-04-15 at 10.17 AM

WordPress Search and Replace using phpMyAdmin

The following method I use to search and replace text on WordPress using phpMyAdmin.

In WordPress, If you have changed the default Table Prefix; that needs to reflect wp_posts.

And finally, replace FIND/REPLACE texts with the appropriate ones.

UPDATE wp_posts SET post_content = REPLACE (  

How to stop WordPress Brute-force login attack

Wordpress admin login easily be filtered by IP Address. This method is especially useful as a measure to tackle Brute-force login attack.

This is achieved by placing a .htaccess in the wp-admin directory with the following…

Order Deny,Allow
Allow from IP.IP.IP.IP
Allow from IP.IP.IP.0/24
Deny from all

You can also use the CIDR notation to Allow/Deny a range of IP addresses.

WordPress Find and Replace String

I had to do a find and replace a string on all of the wordpress post. This can only be done via a MySQL query and won’t take more than a minute.

This is how it’s done. In the following example, I will be finding X and replacing it with Y

The string will find X in every single post and replace it with Y. This also works with phrases, URLs etc..

update wp_posts set post_content = replace(post_content, 'X', 'Y')

301 Redirect is considered as a permanent redirect compared to a 302 redirect which is temporary. Therefore when moving wordpress to a new domain, it is a good idea to redirect all the posts to the new domain.

This way all the search engine records will be kept intact and this means you won’t lose any traffics / hits to the website.

This doesn’t mean redirecting from fnode.com to nish.com, it will also redirect every single URL associated with fnode.com to nish.com.

For instance, if a user is looking for a particular post and goes to fnode.com, they will be redirected to the corresponding post on nish.com

Here is an example of one of the most popular post on the site…


When users clicks on the above link, they will be automatically redirect to


This way, the user won’t notice the domain change because it is 99% directed via search engine or linked URL.

This method is also a good way to let GoogleBot to know that the domain has been moved permanently from fnode.com to nish.com

Here is the code below and I used which goes into the .htaccess file. All you got to do is to replace the URL to make it work with your own domain.

# BEGIN WordPress
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.fnode.com
RewriteRule (.*) http://www.nish.com/$1 [R=301,L]
# END WordPress

Copyright © Nish Vamadevan 2002-2018. All Rights Reserved. Terms and Policies.