大网数据广告活动
网站运营与故障问答

On WordPress site, the domain name is changed to the IP address if any link is clicked

· 52CE 我爱测

I have registered my domain from namecheap.com There I set up an A record type www pointing to my static IP address. If I enter my domain name in the browser address bar then the the welcome page is shown from my server, unfortun…

问题原文

原帖链接 · Ciprian Dragoe · CC BY-SA 3.0

I have registered my domain from namecheap.com There I set up an A record type www pointing to my static IP address. If I enter my domain name in the browser address bar then the the welcome page is shown from my server, unfortunately if I click any link from my welcome page then the domain name changes to the static IP address/{link_name}

Example: I type in the web browser address bar: www.example.com => my welcome page is shown. if I click on post1 from my welcome page then I would like to address in the browser to change to www.example.com/post1. Instead the address is changed to 44.21.11.22/post1 (the ip address of the server).

I am running a WordPress site and my server is a QNAP NAS.

已采纳解答

原帖链接 · Stephen Ostermiller · CC BY-SA 3.0

In WordPress, this usually means that you have the "site address" setting set to your IP address. From the WordPress documentation:

On the Settings->General screen in a single site installation of WordPress, there are two fields named "WordPress Address (URL)" and "Site Address (URL)". They are important settings, since they control where WordPress thinks your site is located. They control the display of the URL in the admin section of your page, as well as the front end, and are used throughout the WordPress code.

The "Site Address (URL)" setting is the address you want people to type in their browser to reach your WordPress blog.

Go into your WordPress admin section, find that setting and change it to your domain name.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2017-05-09)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。