---
title: "How to change URLs embedded in a HTML macro through database"
canonical: "https://support.appfire.com/space/SUPPORT/89133967/How%20to%20change%20URLs%20embedded%20in%20a%20HTML%20macro%20through%20database"
format: markdown
---
<span style="color: #333333">This article explains step by step instructions on identifying and changing the URLs embedded in Confluence through database.</span>

## <span style="color: #333333">Instructions</span>

> ⚠️ - <span style="color: #333333">Create a database backup before changing anything.</span>
> ⚠️ - <span style="color: #333333">Additionally, any database modifications must be done while Confluence is shut down and not running.</span>

### <span style="color: #333333">Search for URLs in the Confluence database:</span>

1. <span style="color: #333333">Stop Confluence following your standard procedure.</span>
2. <span style="color: #333333">Run a SQL statement to update the body content. An example is shown below: </span>
  **SQL query to identify the embedded URL's**
3. <span style="color: #333333">Replace the </span>*<span style="color: #333333"><INSERT_KEYWORD_HERE></span>*<span style="color: #333333"> with your keyword. The '</span>*<span style="color: #333333">%</span>*<span style="color: #333333"> ' symbol represents a wildcard search.</span>
4. <span style="color: #333333">The SQL results return the </span>**<span style="color: #333333">CONTENTTYPE</span>**<span style="color: #333333">,</span>**<span style="color: #333333">TITLE</span>**<span style="color: #333333"> with other space details including the </span>**<span style="color: #333333">SPACESTATUS</span>**<span style="color: #333333"> (either CURRENT or ARCHIVED).</span>
  **<span style="color: #333333">Sample query :</span>**
  **Example**
  **<span style="color: #333333">Output:</span>**

![image](media://0c773283-2abf-4245-ad67-ea9f69604a77)

### <span style="color: #333333">Change URLs in the Confluence database:</span>

1. <span style="color: #333333">  Run the query to change the URL links within the Confluence pages.</span>
  **<span style="color: #333333">Sample query :</span>**
  **Example**
2. <span style="color: #333333">Start Confluence following your standard procedure.</span>
3. <span style="color: #333333">Validate the change of the URL links within the Confluence pages.</span>