Title: Open graph data lost after moving from HTTP to HTTPS
Last modified: March 23, 2020

---

# Open graph data lost after moving from HTTP to HTTPS

 *  Resolved [dasfgh](https://wordpress.org/support/users/dasfgh/)
 * (@dasfgh)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/open-graph-data-lost-after-moving-from-http-to-https/)
 * Hi all,
 * I apologize for my english and I apologize that I can’t give you a link to my
   WP website, because it is in a complete mess now and I don’t want the public 
   to see that.
 * The website is old and it was not updated for a very long time. Recently, I moved
   it from HTTP to HTTPS, but all the open graph data that I have entered for years
   for each post or page is now lost. I don’t see it anymore. I’m using a plugin(
   Open Graph Protocol In Posts and Pages v2) and I searched for a specific forum
   dedicated to it, but couldn’t find any. I assume that the plugin is no longer
   supported (correct me if I’m wrong).
 * In short, can you tell me please: is there any way to restore the OGP data that
   I once had? I have backups of my website, but how to take that OGP data from 
   the backup and automatically import into this new HTTPS enviroment?
 * It would be very hard for me to fill all the OGP data manually again.
 * Thank you very much.
    -  This topic was modified 6 years, 2 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
      Reason: Moved to Fixing WordPress, this is not an Everything else WordPress
      topic

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

 *  Thread Starter [dasfgh](https://wordpress.org/support/users/dasfgh/)
 * (@dasfgh)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/open-graph-data-lost-after-moving-from-http-to-https/#post-12569297)
 * UPDATE: I changed back https to http in the database (search and replace) to 
   see what will happen and the OGP data appeared again. The solution to this must
   be simple and I will work on it. If someone has a helpful advice, thanks in advance
 *  Moderator [tobifjellner (Tor-Bjorn “Tobi” Fjellner)](https://wordpress.org/support/users/tobifjellner/)
 * (@tobifjellner)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/open-graph-data-lost-after-moving-from-http-to-https/#post-12569362)
 * If I understood it correctly, then you’re using [https://wordpress.org/plugins/open-graph-protocol-in-posts-and-pages/](https://wordpress.org/plugins/open-graph-protocol-in-posts-and-pages/)
   that was last updated 6 years ago (and got closed in the plugin repo more than
   a year ago).
 * Nowadays there are many plugins available that can help you with optimizing your
   site for sharing on social networks. Virtually any [SEO plugin](https://wordpress.org/plugins/tags/SEO)
   will help you, for instance. And they will happily work with https, too.
 * The bad news is that you will have to migrate or redo your settings. If you’ve
   got a big number of posts and pages, then perhaps it would be useful to somehow
   export the data from the database and try to convert it. But if the number isn’t
   too big, then manually doing it may turn out to be quicker. The good thing, though,
   is that most SEO plugins by default reuse the standard meta-data that WordPress
   itself keeps track on – even if you change SEO plugin, a lot of these data will
   remain functional after your move.
 * PS! You can have a look at the HTML your site produces. If the only problem is
   that various links are http in the og: part, then Really Simple SSL might help
   you out. But that’s stopgap solution. You really shouldn’t be using something
   that hasn’t been updated for 6 years – it may start breaking other stuff, too.
 *  Thread Starter [dasfgh](https://wordpress.org/support/users/dasfgh/)
 * (@dasfgh)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/open-graph-data-lost-after-moving-from-http-to-https/#post-12570144)
 * Tor-Bjorn Fjellner, thank you. Yes, it is an old and neglected website with old
   plugins etc.
 * Fortunately, I was able to bring back the OGP data for most of the posts, but
   some is lost (for unbeknowst reasons) and now I’m entering it again manually.
 * As you said, I’ll try to export all that data (e.g. by going in MySQL and choosing
   export only of the OGP fields in post meta or smth like that, I’m not an expert,
   but I’ll try).
 * Now I’m afraid to install a new OGP plugin (not to lose what I already have).
 * Moving to HTTPS messes up everything (the FB shares, too, but that’s another 
   topic, so I’ll discuss it separately).
 * Also searching and replacing [http://yoursite.com](http://yoursite.com) to [https://yoursite.com](https://yoursite.com)
   might break some things, but I will discuss that separately, too.
 * I hope that they will invent an automatic solution for such migrations. This 
   is not good and it can ruin my (almost) 10 years of hard work.
 *  Moderator [tobifjellner (Tor-Bjorn “Tobi” Fjellner)](https://wordpress.org/support/users/tobifjellner/)
 * (@tobifjellner)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/open-graph-data-lost-after-moving-from-http-to-https/#post-12570178)
 * Before you do anything of this: make sure to save a good backup.
 * As I said before: Any of the decent SEO plugins will give you og: markup nowadays.
   And they’ll primarily use the native data structure of WordPress, which makes
   you a bit more future-proof.
 * A couple of quick notes on your other questions:
    When you start using https,
   then there are several things to keep track of. – Google sees it as a new/separate
   site. You need to set up correct 301-redirection in order for Google to move 
   the value to your https version. – Any resources called inside your pages need
   to use https. Otherwise you get issues with mixed content. – When searching and
   replacing, you need a plugin that correctly handles serialized data (URL’s entered
   in various settings pages, for instance). “Better Search&Replace” is usually 
   good at this. (If you just change the URL, then the length declaration in any
   serialized data will mess things up for you.) – A good stop-gap solution is the
   plugin “Really Simple SSL”. It filters the final html from your site and changes
   all links from http to https.
 *  Thread Starter [dasfgh](https://wordpress.org/support/users/dasfgh/)
 * (@dasfgh)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/open-graph-data-lost-after-moving-from-http-to-https/#post-12571235)
 * Thank you once again.
 * In the end I decided to enter the missing OGP data manually, cause it was not
   all lost, only in some posts. Why this happened, I dunno, but anyway.
 * I decided not to install any plugins, I was worried not to mess things more, 
   and I also don’t want to “burden” the website.
 * Then I added this line to httaccess in the root to retreive the missing FB shares:
 * RewriteCond %{HTTP_USER_AGENT} !facebookexternalhit/[0-9])
 * Before that I’ve already added 301 HTTP-to-HTTPS redirect. I solved the non-secure
   images and videos issue by searching and replacing within the wp posts content
   only (I don’t touch anything else).
 * I also manually added a HTTP link to the OGP settings of each post (og url), 
   and then I posted all links in the FB Batch Invalidator. It’s seems that I got
   the share count back.
 * So, all the problems are solved, except this one: [https://wordpress.org/support/topic/fixing-insecure-external-urls-in-media-library/](https://wordpress.org/support/topic/fixing-insecure-external-urls-in-media-library/)
   
   but that’s a separate topic. Thanks.
 *  Moderator [tobifjellner (Tor-Bjorn “Tobi” Fjellner)](https://wordpress.org/support/users/tobifjellner/)
 * (@tobifjellner)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/open-graph-data-lost-after-moving-from-http-to-https/#post-12571266)
 * Oh. Now I understand what you meant about “losing” FB shares. Just like Google,
   I guess that they regard http and https as, basically, separate websites.

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

The topic ‘Open graph data lost after moving from HTTP to HTTPS’ is closed to new
replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [tobifjellner (Tor-Bjorn “Tobi” Fjellner)](https://wordpress.org/support/users/tobifjellner/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/open-graph-data-lost-after-moving-from-http-to-https/#post-12571266)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
