On a multisite environment, get the subdomain value as variable

wp_insert_site recieves WP_Site object, which contains details about the current site. https://developer.wordpress.org/reference/hooks/wp_insert_site/ do_action( ‘wp_insert_site’, WP_Site $new_site ) Fires once a site has been inserted into the database. https://developer.wordpress.org/reference/classes/wp_site/ WP_Site Object ( [blog_id] => 2 [domain] => localhost [path] => /m2/sagres/ [site_id] => 1 [registered] => 2018-03-23 13:49:37 [last_updated] => 2019-03-05 15:52:10 [public] => 0 [archived] … Read more

Understanding how links will work when DNS changed to point to new WordPress site

Old question, but for the record: Provided that you adjust the WP_HOME and WP_SITE urls appropriately, the page links should work just fine when you migrate. An easy way is to add the following lines to your wp-config.php file after uploading the site to therealwebsitename.co.uk: define(‘WP_HOME’,’http://example.com’); define(‘WP_SITEURL’,’http://example.com’); You’ll then be able to then login to … Read more

wordpress domain setup with ec2 apache

All the links in a wordpress database are relational, and based on the URL structure that was used when the database was created. What you need to do is follow the steps to change the URL of the WordPress instance and that should resolve your problem. This is common when changing from a dev platform … Read more

DNS – Change WordPress Site Name?

You need to update all the places in the database that are using the original location. you can use the following tool to do so. There are others but I have found this one to be easy. Just remember to remove the files after you are done with it. I would run this in it’s … Read more