How to prep local links before going live

Hi, I am new using Local to develop a Wordpress site locally and need some help in preparation before uploading the site to my actual domain.
If I copy a file for use into the local directory (e.g. “C:\Users\pne\Local Sites\simteq\app\public\wp-content\uploads\test.txt”, how should I link to it from a page in the site, to ensure it won’t be broken when the site is live, i.e. when the final address to that file will be…/uploads/test.txt?

It’s not quite clear to me which part(s) of the local path will be retained and how to still make it work while still developing local, as well as when it will be online.

Hey paulnaude01,

When you directly upload to that folder, WordPress won’t be aware that it exists, unless you upload to the media library in your site’s admin panel. You can still link to the file, but the best practice would be to upload it through your site so you can manage that file later.

When you push a WordPress site live, the only things you’ll need are typically the database and the /wp-content directory. Since your file is in that directory, the URL should stay the same after you upload the site. I’d recommend using a relative link when using it so you won’t have to update it later, i.e. /wp-content/uploads/test.txt" instead of the full domain name.

Thank-you, that makes sense.