Answers for "site url and home url in wordpress config.php"

PHP
3

home url wordpress

$url = home_url();
echo $url; // Output: http://www.example.com

$url = home_url( '/' );
echo $url; // Output: http://www.example.com/

$url = home_url( $path = '/', $scheme = 'https' );
echo $url; // Output: https://www.example.com/

$url = home_url( $path = 'example', $scheme = 'relative' );
echo $url; // Output: /example
Posted by: Guest on February-08-2021
1

define home url wordpress config.php

// Add the below to your wp-config.php file (replace example.com with your domain)
define('WP_HOME','http://example.com'); 
define('WP_SITEURL','http://example.com');
Posted by: Guest on December-15-2021

Code answers related to "site url and home url in wordpress config.php"

Browse Popular Code Answers by Language