Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
2.0k views
in Q2A Core by
The site is on the same server.
Q2A version: 1.8.0

1 Answer

+2 votes
by
What precisely doesn’t work? Are the image URLs still using the old domain? In which case you’ll need to update them all to use the subdomain.

You might be able to do a search & replace within the qa_posts table to change them.
by
Yes, but there are thousands of photos, how do you imagine it?
by
+1
Look up the REPLACE function in MySQL. Depending on how exactly the content is formatted (e.g. whether it’s HTML) you may be able to do something like:

UPDATE qa_posts SET content = REPLACE(content, '<img src="http://example.com/', '<img src="http://sub.example.com/')

Note: I haven’t tested this so double check and make a backup before running.
...