• Hi all
    I just moved a working installation of WP from a hosting to another one, without changing the domain name (I’ve made a domain transfer).
    Now I cannot see the images, both in the dashboard and in the front-end, and it seems that some settings (i.e. theme settings) are lost.
    I tried to change permalink setting to regenerate htaccess, but nothing changed.
    In the domain transfer, I installed a SSL certificate, so I changed the links in the database with https, and installed Really Simple SSL plugin, but the problem is still there.
    Anyone has ideas to solve it?

    Thanks in advance
    Riccardo

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    so I changed the links in the database with http

    How did you do that?

    Thread Starter Riccardo79

    (@riccardo79)

    Hi Steve
    When I transferred the database, I exported it in SQL from the old hosting, replaced all the http with https with a text editor and imported in the new db.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    replaced all the http with https with a text editor and imported in the new db.

    And that’s where you broke it. Data is serialized and when you changed http to https, you broke things.

    Restore the un-modified database and use this script to do the search and replace:

    https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    or, if you have wp-cli installed, you can use wp search-replace on the command line.

    Thread Starter Riccardo79

    (@riccardo79)

    I tried the script you suggested (interconnect-it), but I still have the same problem.
    I noticed a strange thing: if I open an image, typing its url in the browser address bar, then this image always shows in the pages or articles (as if it is cached in the browser), but the other images are not displayed.

    P.S. I don’t use any caching plugins.

    • This reply was modified 6 years, 12 months ago by Riccardo79.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Did you run the script on the *original* database or the one you modified with the text editor? The latter will not work.

    Please provide a link to a page on your site where we can see this. Thanks.

    Thread Starter Riccardo79

    (@riccardo79)

    I run the script on the SQL dump of the original DB, after importing it in the new hosting database.
    Here is the url of one of the articles: https://www.insardinia.ch/sport/vela/

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I’m seeing 403 errors, not 404s. Check the ownership and permissions on wp-content/uploads/ and below. Directories should probably be 755, files 644.

    Thread Starter Riccardo79

    (@riccardo79)

    I tried to change the permissions, but I still have the problem. I think I’ll open a ticket to the hosting customer service to solve it.

    Thanks for your support!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Moving WP from a hosting to another, same domain, images not shown’ is closed to new replies.