Totara Learn Open Discussions

URL updating within the Page Content box

 
Nicole Kim
URL updating within the Page Content box
di Nicole Kim - Thursday, 9 October 2025, 12:46
 

I have added a PDF to the Page via the link button in the Page Content box. Our organization will have to move the build to a production environment, thus changing the "dev" portion of the URL (highlighted below). Will the URL auto-update when this change is made, or would we need to manually re-upload the file for the PDF to appear?


Craig Eves
Re: URL updating within the Page Content box
di Craig Eves (Totara Support) - Thursday, 9 October 2025, 15:48
 

Hi Nicole

Some references will not be updated such as references to files

see https://totara.help/docs/change-the-url-of-your-site

If you are updating the URL of your site there may be references to the old URL in the database that need to be updated. You can update these references by following these steps:

  1. Go to Quick-access menu > Server > Maintenance mode and enable maintenance mode.

  2. Create a full backup of your database and data directory.

  3. Run the admin/cli/replace.php script (please see the warning below).

  4. Change your config.php.

  5. Purge all caches (php admin/cli/purge_caches.php).

  6. Optionally configure redirects in your web server for the old URL to the new URL (refer to your web server documentation).

  7. Test the site thoroughly as a Site Administrator.

  8. Disable maintenance mode.

Please note that using the admin/cli/replace.php script is high risk, and should be done carefully. Ensure that the string that you are replacing is unique enough that it could only match uses of the old URL, otherwise you will risk replacing strings you did not intend to. The changes made here cannot be undone, so if you encounter problems then you should restore the backup taken in the first step.

regards