Using cornerstone in server loses the image URL after saving

I developed my site locally after purchasing X and learning how to use Cornerstone. I then used BackupBuddy successfully to move my entire site from my local computer to a server in Bluehost. The issue I have though is that if I want to edit any page in the server using Cornerstone and SAVE, the links to all images go back to using http://localhost:8888 as prefix and hence are not found (I get a small icon where the image should be). I used my browser’s web inspector to determine what the error was.

My website is: wfuentrepreneurship.info/site3

There are no errors at this moment in this site, since it’s live. But the moment I edit using Cornerstone in the server, the problem with the images appears.

Hi there @paucavp,

Thanks for writing in!

It’s most likely down to Backup buddy, not correctly replacing all links within the database, our lead developer posted a lengthy reply on this Facebook post https://www.facebook.com/groups/xthemeusers/permalink/879156542260754/?comment_id=880921535417588&comment_tracking={“tn”%3A"R2"} (you’ll need to member of X Theme Users to see that).

So a find and replace script you can also run a replacement using escaped backslashes like so:

http:\/\/localhost:8888-> http:\/\/example.com

This allows all the Cornerstone data to be correctly replaced with the right URL, rather than using just the core URL of the old site and new site.

Thanks!

So my website looks fine AFTER moving it to the server using BackupBuddy. All pictures are there when viewed in a remote browser. The issue is when I try to edit in the server using Cornerstone. The picture links are wrong. I’ve checked the database tables and found many references such as “http://localhost:8888/entrepreneurship/wp-content/uploads/2017/08/back.jpg
within the meta_value for meta_key=_cornerstone_data in the wp_postmeta table.

I’ve tried find and replace “http://localhost:8888/entprepreneurship” -> “http://wfuentrepreneurship.info” in that table to no avail. The meta_value still show many places that have not been replaced.

Please help.

Hi There,

That’s when you know that the BackupBuddy did not able to replace all the references from localhost:8888 to your live domain.

If you still have the localhost database intact, please redo the migration process, but this time follow the Migrate Cornerstone Data from Site to Site guide provided here.

Remember to clear all caches (plugin, server-side, CDN, and browser’s cache) after migration and turning off your local server. This will help you to avoid any potential errors.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.