You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This article covers changing your WordPress URL.

[paragraph]For many people out there, the "WordPress Address (URL)" and "Site Address (URL)" fields found in the "General Settings" of WordPress can be hard to understand or change once you have updated them. In many cases, an individual will change this without making the proper changes on their database. Next thing you know your site is down and you cant even login to make changes to your site. Well thats why we are here.[/paragraph]

Editing the "WordPress Address (URL)" and "Site Address (URL)" in "General Settings"

[paragraph]To make a change to the URL, you are going to want to login and go the "General Settings" tab underneath "Settings", from there you are going to want to edit the fields called "WordPress Address (URL)" and "Site Address (URL)" to the proper URL. Just click on "Save Changes" and you should be good. A picture of the General Settings page is depicted below.[/paragraph]

[image source="https://www.hostdime.com/resources/wp-content/uploads/2012/06/wordpressgeneralsettings-1024x641.png " hovertext=" "]

What to do if you Break Something and Can't Log In (Setting the URLs Manually)

[paragraph]Many times an individual will make the changes or type in something wrong by accident and break their WordPress install. To fix this we will add code to "wp-config.php" to make changes to the URLs manually. So what you are going to want to do is open your "wp-config.php" file in your WordPress install via FTP or SFTP client and add the following code to someplace where it wont be commented out:[/paragraph]

define('WP_HOME','http://example.com');

define('WP_SITEURL','http://example.com');

After the code has been inserted, go ahead and update the file to your server and your site should be fixed. This will also disallow editing the URLs within WordPress, so that can be a plus as well.

Hope you enjoyed the tutorial!
  • No labels