Anyone can help me on changing all the image path at once - WP?

by mert
7 replies
  • WEB DESIGN
  • |
Hi,

I'm using StoreFront wordpress theme. I just copied all the website files/DB and upload them to the another site.

The problem is; the old site url (domain name) came with the new site installation. There are more than 100 product links, It will take huge time if I do that manually.

2012-02-21_1817 - digitane's library

If anyone know the solution, I'll be appreciated!
#changing #image #path
  • Profile picture of the author dialseo
    Go to PHPMyAdmin, locate your database, and go to SQL.
    Code:
    update wp_posts set post_content = replace(post_content, 'find this string', 'replace found string with this string');
    More info here: How to find / replace in mysql for wordpress permalinks that have changed | BlinkTag Inc
    {{ DiscussionBoard.errors[5670687].message }}
  • Profile picture of the author Istvan Horvath
    WordPress › Search and Replace « WordPress Plugins
    With the plugin above no need to mess with the database directly... However, it is a VERY POWERFUL tool and all the changes you make are permanent and irreversible. Always have a backup of your original database!
    Signature

    {{ DiscussionBoard.errors[5670757].message }}
  • Profile picture of the author mert
    Originally Posted by Istvan Horvath View Post

    WordPress › Search and Replace « WordPress Plugins
    With the plugin above no need to mess with the database directly... However, it is a VERY POWERFUL tool and all the changes you make are permanent and irreversible. Always have a backup of your original database!
    Istvan, earlier today I've already tried this plugin but nothing is changed.

    Originally Posted by dialseo View Post

    Go to PHPMyAdmin, locate your database, and go to SQL.
    Code:
    update wp_posts set post_content = replace(post_content, 'find  this string', 'replace found string with this string');
    More info here: How to find / replace in mysql for wordpress permalinks that have changed | BlinkTag Inc
    it did't work out either
    {{ DiscussionBoard.errors[5671172].message }}
    • Profile picture of the author Istvan Horvath
      Originally Posted by mert View Post

      Istvan, earlier today I've already tried this plugin but nothing is changed.
      Then we have to clarify where is your site storing those URLs.
      If they are in the database - at least one of the suggested solutions should work. Provided you are using the tools correctly.

      You need to define the field(s) where to search and provide the original string and the new string as well.

      See the image below:
      Signature

      {{ DiscussionBoard.errors[5672962].message }}
      • Profile picture of the author mert
        Originally Posted by Istvan Horvath View Post

        Then we have to clarify where is your site storing those URLs.
        If they are in the database - at least one of the suggested solutions should work. Provided you are using the tools correctly.

        You need to define the field(s) where to search and provide the original string and the new string as well.

        See the image below:
        Well, probably there is a bug on the theme. When I use search and replace plugin, all strings are disappeared.
        {{ DiscussionBoard.errors[5677721].message }}
  • Profile picture of the author kokopelli
    I've always found it easier to download ("export") the MySQL dump via phpMyAdmin, open it in a plain text editor, and simply do a search/replace. Save, import ... done.

    If you selected "Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT statement" via the "Custom Export Method", the old tables will automatically be replaced when importing. Otherwise, you'll have to drop them first.

    As was suggested already, be sure to make a full database backup before you attempt any of this!
    Signature
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    {{ DiscussionBoard.errors[5674178].message }}
    • Profile picture of the author mert
      Originally Posted by kokopelli View Post

      I've always found it easier to download ("export") the MySQL dump via phpMyAdmin, open it in a plain text editor, and simply do a search/replace. Save, import ... done.

      If you selected "Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT statement" via the "Custom Export Method", the old tables will automatically be replaced when importing. Otherwise, you'll have to drop them first.

      As was suggested already, be sure to make a full database backup before you attempt any of this!
      This is what I did very firstly. Nope.. It didn't workout either.

      I'll contact with the theme developers directly.

      Thank you for all guys.
      {{ DiscussionBoard.errors[5677732].message }}

Trending Topics