»  Knowledgebase  »  WordPress Administration  »  Override Site URL in wp-config.php

Override Site URL in wp-config.php

by | Mar 19, 2020 | 0 comments

It is possible to set the site URL manually in the wp-config.php file to override the database values. This is useful when syncing a database from the live site.

Edit wp-config.php

Add these two lines to your wp-config.php, where “example.com” is the correct location of your site.
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
Reference: https://codex.wordpress.org/Changing_The_Site_URL

0 Comments

Submit a Comment

Your email address will not be published.

UK WordPress Support

We are a team of UK based WordPress experts offering WordPress help & support, WordPress site management and maintenance, content management services, one to one WordPress training and consultancy.

Need to chat? Contact Us Now!

WordPress Maintenance

Let us manage your plugin and theme updates, keep your WordPress website site running smoothly and your visitors happy!

WordPress Care Plans
from just £35 / month!

One to One WordPress Training

We provide one to one WordPress training to individuals and companies all over the World!

Whether you are developing new skills for business or working on a personal project, we can support you, and your first trial session is free!

Book an initial WordPress Orientation Session

Get the WordPress Management Guide

Get the WordPress Management Guide

Sign up to our newsletter to receive our insider guide to managing WordPress in [currentyear], free to your inbox.

You have Successfully Subscribed!