Jump to content

WordPress:Merubah URL

From Wiki
Revision as of 16:36, 5 September 2022 by Kangtain (talk | contribs) (Created page with "==Edit <code>wp-config.php</code>== It is possible to set the site URL manually in the wp-config.php file. 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' ); This is not necessarily the best fix, it’s just hard-coding the values into the site itself. You won’t be able to edit them on the General settings page anymore when us...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Edit wp-config.php

It is possible to set the site URL manually in the wp-config.php file.

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' ); This is not necessarily the best fix, it’s just hard-coding the values into the site itself. You won’t be able to edit them on the General settings page anymore when using this method.