XF 1.4 Regex sql query for changing http links to https

dethfire

Well-known member
#1
I want to change my internal links from http to https. I have about 14 years of posts where members used my http. Can I do this with a sql query regex on my message field?
 

AndyB

Well-known member
#2
The query you want to run in phpMyAdmin is this:

Code:
UPDATE xf_post SET message = REPLACE(message, 'http://www.physicsforums.com', 'https://www.physicsforums.com')
Please run this type of query only after a recent backup.
 

DeltaHF

Well-known member
#3
Note: if you have enabled the Cache BB Code Output setting in the AdminCP > Options > Performance page, then all of your posts will be cached in the xf_bb_code_parse_cache table, so you won't see the changes applied immediately after running Andy's query above.

To refresh the cache, simply run the following query when you are done:
Code:
TRUNCATE TABLE xf_bb_code_parse_cache;
Like dethfire, I also just moved from HTTP to HTTPS and updated all the internal links in my forum. I couldn't see the changes, but this was why. Hope it helps someone else. :)
 
Top