• I have a updated a WP site. The developer should upload to my server, but did not find how to do it as long as we have no CPanel on server 🙂 He zipped the site, forgot the media library, and uploaded to dropbox. When unzipping some pages distorted, and all pages missing images of course. He has no backup.

    He refuses to fix this, so I wander if there is a search and replace function in WP, I have to change uploads from 09.14 to 06.15. Hope there is a way to do this to avoid spending lots of time on this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • If you have used Dashboard > Tools > Import for what you had available, all of that now exists in your database and this SQL can be edited and used in phpMyAdmin to update an URL:

    ** note: Change 'pref' to correct table_prefix
    
    UPDATE pref_options SET option_value = replace(option_value, 'http://www.olddomain.com', 'http://www.newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
    UPDATE pref_posts SET guid = replace(guid, 'http://www.olddomain.com', 'http://www.newdomain.com');
    UPDATE pref_posts SET post_content = replace(post_content, 'http://www.olddomain.com', 'http://www.newdomain.com');

    I have to change uploads from 09.14 to 06.15.

    I do not know whether the above can address that, but a database expert would likely known an SQL that could.

    Thread Starter geron2

    (@geron2)

    Thanks. Databases frighten me a lot! Never edited a db. I will have a go on another server, and if I get into trouble I will do the manual changing of URL for the site 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Find and replace in WP’ is closed to new replies.