-1

This can probably be fixed quite easily. I tried to research and find the answer to this but couldn't find anything relevant.

Basically, I can access my website perfectly through its url. (ex. example.com)

Whenever I click a link, go to my /wp-admin, or go to any other page, my domain changes into the IP address. (ex. instead of showing example.com/about it would show 192.111.223.4/about)

How do I fix this? Do I have to edit a file or can this be fixed by adding a domain record?

Thanks.

Doug Beney
  • 121
  • 4

2 Answers2

1

Since you mention /wp-admin, chances are this is WordPress's doing.

https://codex.wordpress.org/Changing_The_Site_URL

In wp-config.php, update or add:

define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
ceejayoz
  • 32,910
  • 7
  • 82
  • 106
1

Solved!

Phew... This was a simple fix.

In the Wordpress dashboard I went to Settings>>General and then changed WordPress Address (URL) and Site Address (URL) into my actual domain instead of an IP.

Doug Beney
  • 121
  • 4