Answers for "wp override home url with php"

PHP
1

wp override home url with php

// add these 2 lines to your wp-config.php, 
// exactly before requiring wp-settings.php
define( 'WP_HOME', 'http://localhost/site' );
define( 'WP_SITEURL', 'http://localhost/site' );
// NOTE: you'r overriting the homeurl locally, without changing the value in DB.
Posted by: Guest on July-22-2021

Browse Popular Code Answers by Language