Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Yesterday at 02:04 PM
Matt Johnson Posted April 7, 2015 Posted April 7, 2015 Hello,Is there a easy way to find and replace text from posts? For example, I am wanting to change all instances of one URL (http://xxxxxx.com/xxxxx) to (http://yyyyy.com/xxxxx) I am thinking an SQL command, but I tried this SELECT REPLACE ('http://xxxxxx.com/','http://xxxxxx.com/','http://yyyyy.com/') and it ran but didn't update anything.
不中用 Posted April 7, 2015 Posted April 7, 2015 Should be something like this ..UPDATE tableSET column = REPLACE( column, 'xxxxx.com', 'yyyyy.com')WHERE column like '%xxxxx.com%';
socceronly Posted April 7, 2015 Posted April 7, 2015 Isn't there a word replace tool for swear words ect...?
The Jimmo Posted April 7, 2015 Posted April 7, 2015 Isn't there a word replace tool for swear words ect...? Believe that only works on posts moving forward, not anything that has already been posted.
Matt Johnson Posted April 8, 2015 Author Posted April 8, 2015 Should be something like this ..UPDATE tableSET column = REPLACE( column, 'xxxxx.com', 'yyyyy.com')WHERE column like '%xxxxx.com%';Would this replace the actual text in the posts? That is what I am trying to change. The board migrated over to the new URL fine and I updated the global file. No issues there. I am trying to change any text/links that people posted referencing the old domain. In theory, the 301 redirect should cover it, but I'd like to clean it up if possible.
The Jimmo Posted April 8, 2015 Posted April 8, 2015 Would this replace the actual text in the posts? That is what I am trying to change. The board migrated over to the new URL fine and I updated the global file. No issues there. I am trying to change any text/links that people posted referencing the old domain. In theory, the 301 redirect should cover it, but I'd like to clean it up if possible.Yes. You will have to find the right table and column but it will replace anything that matches that string value.
不中用 Posted April 9, 2015 Posted April 9, 2015 Would this replace the actual text in the posts? That is what I am trying to change. The board migrated over to the new URL fine and I updated the global file. No issues there. I am trying to change any text/links that people posted referencing the old domain. In theory, the 301 redirect should cover it, but I'd like to clean it up if possible.Yes. You will have to find the right table and column but it will replace anything that matches that string value.Yes. Same what he said .. If you not feel so familiar with MySQL, please make a test database first with a simple table where you can test this replacement function first, and check the result .. .
Recommended Posts
Archived
This topic is now archived and is closed to further replies.