最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

permalinks - how do links move when I move my site?

matteradmin8PV0评论

Very new at this, so maybe I am missing some fundamental understanding of how WordPress handles links. But, I'm building a website on my local machine, expecting to upload it to a provider when I'm done. Right now everything resolves to localhost.

Here's the problem. One of the pages has a list of links to other pages on the site. WordPress created those links as http://localhost/...

Shouldn't there be a placeholder for the domain name there instead of a hardcoded localhost? Or better yet, shouldn't they be relative links instead of fully qualified URLs?

Or will WordPress automatically fix those links when I move my site to a provider?

Very new at this, so maybe I am missing some fundamental understanding of how WordPress handles links. But, I'm building a website on my local machine, expecting to upload it to a provider when I'm done. Right now everything resolves to localhost.

Here's the problem. One of the pages has a list of links to other pages on the site. WordPress created those links as http://localhost/...

Shouldn't there be a placeholder for the domain name there instead of a hardcoded localhost? Or better yet, shouldn't they be relative links instead of fully qualified URLs?

Or will WordPress automatically fix those links when I move my site to a provider?

Share Improve this question asked Mar 20, 2019 at 13:44 DThompson55DThompson55 32 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 2

Some links (those built in code) will automatically change to your new domain. Others (those in post content) you will want to swap out using something like better search replace to swap out localhost for your new domain.

Those URLs are stored in your WordPress database. Once you have moved your site to your provider, you will need to update the values in your database.

This article should point you in the right direction.

https://codex.wordpress/Moving_WordPress

Post a comment

comment list (0)

  1. No comments so far