Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Easily check DNS migration changes - see whether a DNS change has propagated when you don't have command line access.
Plugin Name: Migration Test
Plugin URI:
Description: Display the server name in the footer. Used to easily see when a site migration DNS changes have propagated.
Author: Damien Carbery
Author URI:
License: GPL2
add_action( 'wp_footer', 'dcwd_server_hostname', 100 );
function dcwd_server_hostname() {
// Add a comment which may not be possible to see when on a mobile or table device.
echo '<!-- ', "\n", $_SERVER[ 'SERVER_ADDR' ], ' (expecting', "\n", '-->';
// Or a paragraph with small, light font (change the font colour to be discreet against the footer background).
echo '<p style="font-size: 9px; color: #ccc">', $_SERVER[ 'SERVER_ADDR' ], ' (expecting</p>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.