# Can't access website since i've changed domain name

**URL:** <https://community.localwp.com/t/cant-access-website-since-ive-changed-domain-name/36619>\
**Category:** Support\
**Created:** [April 24, 2023, 3:52pm UTC](https://community.localwp.com/t/cant-access-website-since-ive-changed-domain-name/36619 "2023-04-24T15:52:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![loltuner](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@loltuner](https://community.localwp.com/u/loltuner)\
**Post date:** [April 24, 2023, 3:52pm UTC](https://community.localwp.com/t/cant-access-website-since-ive-changed-domain-name/36619/1 "2023-04-24T15:52:35Z")

</div>

Hi

Since i’ve changed my domain name on Local and the web adress in WP, i can’t access to my website.

I have tried changing back the domain name to its previous status (but can’t change the website address though) and still can’t access to my website.

Any idea please ?

### Issue Summary

Can’t access website since i’ve changed domain name

#### Troubleshooting Questions

- Does this happen for all sites in Local, or just one in particular?  
one

- Are you able to create a new, plain WordPress site in Local and access it in a Browser?  
yes

#### Replication

Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!

#### System Details

- Which version of Local is being used?  
6 7 0 - 6 3 4 7

- What Operating System (OS) and OS version is being used?  
Mac os Ventura

- Attach the Local Log. See this Help Doc for instructions on how to do so:

### Security Reminder

Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

---

<div class="post-metadata">

**Author:** ![sambrockway](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/sambrockway/32/18726_2.png) [@sambrockway](https://community.localwp.com/u/sambrockway)\
**Post date:** [April 24, 2023, 5:18pm UTC](https://community.localwp.com/t/cant-access-website-since-ive-changed-domain-name/36619/2 "2023-04-24T17:18:39Z")

</div>

Hi there @loltuner -

**Before moving forward with anything, I would recommend making a backup of your Local site. Here’s an article about that:**

> **[How to Backup a Local Site](https://localwp.com/help-docs/advanced/how-to-backup-a-local-site/)**
>
> Like other files on your computer, we recommend you backup your Local Sites to avoid data loss and protect your hard work. Click “Start Site” on your Local Site to start it. For a complete copy of…

Have you tried to manually set the Site URL using the `wp-config.php` file?

You should be able to update the Site URL through the `wp-config.php` file (which can be accessed by heading into the Local app \> Go to site folder \> app \> public \> `wp-config.php`).

Then you can add these lines of code (replacing with the appropriate domain)

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

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

There is a tradeoff here, though. This will hardcode the site URL and you will no longer be able to update them within the WordPress settings in the Dashboard.

The other option is to update the functions.php file (as described in **[this article](https://wordpress.org/support/article/changing-the-site-url/)**) and then the code can be removed and will not hardcode the site URL.

Can you give this a try and let me know if this helps?

Sam

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [July 23, 2023, 5:19pm UTC](https://community.localwp.com/t/cant-access-website-since-ive-changed-domain-name/36619/3 "2023-07-23T17:19:06Z")

</div>

Closed on July 23, 2023, 5:19pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
