Home / Admin / Change site url
Duplicate Snippet

Embed Snippet on Your Site

Change site url

add_action('init', 'update_site_url_once');
function update_site_url_once() {
if (get_option('home') !== 'https://amazingmarvin.com/blog/') {
update_option('siteurl', 'https://amazingmarvin.com/blog/');
update_option('home', 'https://amazingmarvin.com/blog/');
}
}

Code Preview
php
<?php

Comments

Add a Comment