How to edit uploaded text files
To edit a text file you uploaded to TeleportHQ, open the Assets Manager's Uploads tab, right-click the file and choose Edit. Change the text in the code editor that opens, then click Save. TeleportHQ updates the same file, so any links to it keep working.
Before you start
- You can edit these file types:
txt,xml,json,js,css,env,ymlandyaml. - Other files, such as images or PDFs, can't be edited in TeleportHQ. Upload a new version instead.
Steps
- In the left sidebar, click Assets Manager.
- At the top of the panel, click the Uploads tab.
- Find the file in the Public, Private or Functions folder. For example,
opening-hours.json. You can type its name in the Search box. - Right-click the file. (Or point at it and click ⋯.)
Choose Edit.
- A window titled Editing: opening-hours.json opens, with the file in a code editor. Make your changes.
- Optional: click { } (tooltip Prettify code) at the bottom left to tidy the formatting.
- Click Save, or press Ctrl+S (Cmd+S on Mac). The window closes and the file is updated.
To close the window without saving, click the x at its top right.
Check that it worked
Open the file with Edit again. Your changes are there.
- Links to the file, such as one made with Copy Asset Link to Clipboard, show the new version without publishing. A browser that opened the file before your edit may show the old version for up to two days.
- Files built into your site, such as files in the Private and Functions folders, change on your live site the next time you publish.
Troubleshooting
"Upload failed. The extension of your file does not match its content. Please check your file." TeleportHQ checks that json, yaml and css files are valid when you save. The window has already closed, and your changes weren't saved. Open the file with Edit again, make the change again, and look for a missing comma, quote or bracket before you click Save. For long edits, copy your text (Ctrl+A, then Ctrl+C) before you save, so you can paste it back.
"Failed to run prettier, please check the syntax." Prettify code couldn't read the file because of an error in it. Fix the error, then try again. This is also a quick way to check a json file before you save it.
"Failed to run fixer, please check the syntax." Sanitize HTML (the button next to { }) couldn't process the file because of an error in it. Fix the error, then try again.
I don't see Edit in the menu The file type can't be edited. Only txt, xml, json, js, css, env, yml and yaml files can.
Good to know
- To manage your site's
robots.txtand sitemap, TeleportHQ has dedicated SEO settings. See How to set up your sitemap, robots.txt and llms.txt. - Configuration files for developers, such as
next.config.js, go in the Private folder, and server functions in the Functions folder. See What are the Private and Functions folders?