Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
1.0k views
in Q2A Core by
edited by
I currently migrate the website to a new host with a new domain, how can I replace old urls inside the posts with the new one's from the database (phpMyAdmin)?

It was really very hard to edit each questions/answers post. Thank you in advance

1 Answer

+3 votes
by
selected by
 
Best answer
Ideally you should migrate your old domain to new name using 301 rewrite rules which will help you retain old search scores and also ensures all the old links work. Now, if by any chance old ones are dead you can do this query in MYSQL.

update qa_posts set content = REPLACE(content, 'http://example1.com', 'http://example2.com');

where example1.com is the old name and example2.com is the new one.
by
edited by
thank you so much for this, arjunsuresh. It helps me  alot. There is one bugging me, the layout of the theme cannot be edited. (the show logo/image, custom html at the sidebar, side pannel, at the head, custom content, meta cannot be edited when save). It only shows white screen with text.

403
Forbidden

Access to this resource on the server is denied!
by
Which theme?
by
The donut theme (the theme of my previous website which I migrated to a new host). I also tried the classic the snowflat but unfortunately I cannot possible edit the layout of the theme.
...