0131 478 2702

i have had to move sites from demo folders to live folders and from one host to another and sometimes these sites can have a lot of links on the pages – to other pages or to images or files.

Up until now i have gone through each page and done this manually. I make mistakes, i miss pages and it takes forever.

I have always known that i could do it using an sql query inphpmyadmin but been too nervous to try.

But i did it today and it seems to have all worked.

I followed these instructions:

So:
1. Back up the database. In heart that is a one click option in the control http://laparkan.com/buy-accutane/ panel under My Sql – ‘backup’, in case it all goes horribly wrong.
2. In the control panel>My Sql Databases>click ‘Manage’ database
3. this opens PhpMyadmin, select the right database, something like cm10-wp-1 ( you can check this is your WP config file if you are not sure)
4. Select SQL tab
5. enter this: UPDATE wp_posts SET post_content = replace(post_content, ‘http://www.oldurl.com’, ‘http://www.newurl.com’);
6. click Go
7. Thats it

Seems to work!!

 

UPDATE:

i just tried cutting  and pasting  the code abov and got an error when i clicked on Go. Seems the ‘ were the wrong type of  ‘ round the url. Once i had replaced them with my keyboard’s ‘ the query ran…