Best 2 Know

The Ultimate Blogging Resource

  • Advertising
  • WebHosting
  • Contact Us
  • Blogger
    • Blogger Templates
    • Blogger Tutorials
  • Browser
    • Firefox
    • Google Chrome
  • Google
  • Internet
    • Facebook
    • Twitter
  • Thesis
  • Windows
  • WordPress
    • WordPress Themes
    • WordPress Plugins
  • More
    • Linux
    • Review
    • Solutions
    • Announcements

JetPack Related posts and Sharing not working with NGINX

JetPack related posts plugin stopped displaying related post results few months back when I shifted the servers to DigitalOcean VPS and started using nginx as web server instead of Apache. Together with JetPack Sharing plugin not working and related posts not displaying, I started searching logs to find what is wrong? but I didn’t find any errors or warning in the logs and my website on nginx was working perfectly without any errors.

So I started playing around and whenever I clicked on the sharing plugins button I used to be redirected to the same post page instead of going to the desired social networking site.

Sharing plugin not redirecting to Twitter when clicked on the share button.

Sharing plugin not redirecting to Twitter when clicked on the share button.

As you can see in the above image that, the page is just reloaded instead of redirecting to the Twitter website for Tweeting about that page.

After digging around for some time, I saw that the arguments are not passing through. so I once again went to WordPress website to search for nginx related setup instructions and found out that in the nginx configuration file there is no $args attribute for passing the arguments. Below is the code found in my nginx configuration file :

try_files $uri $uri/ /index.php;

Instead of the above line it should be :

try_files $uri $uri/ /index.php?$args;

Fixing Related posts and Sharing plugin

To fix JetPack not working plugins edit the configuration file by following the below steps :

  1. Open nginx configuration file for your WordPress installation in your favorite text editor . for me it is vim
    vim /etc/nginx/sites-enabled/best2know

    where best2know is the name of the configuration file.

  2. Find the below line in the file (it should be near the top) :
    try_files $uri $uri/ /index.php;
  3. press i to edit text if you are using vim, to change the above code to the one below :
    try_files $uri $uri/ /index.php?$args;
  4. After that to save the file press esc and type :wq.
  5. Now that the file is saved just restart nginx by using the below command:
    service nginx restart

Now JetPack related posts and sharing plugin should be functioning properly. Because JetPack related posts are requested by adding ?relatedposts argument at the end of the Post URL. Which in turns returns related posts Data in JSON format.

Here’s an Video tutorial for those, who are unable to understand or are getting confused on how to proceed? to fix Jetpacks problem with NGINX

Subscribe via Email

Share this:

  • Twitter
  • Facebook
  • Pocket
  • Print
  • Email

Related

November 10, 2015 Ritesh Sanap WordPress Jetpack, nginx, Related Posts Plugin

Post navigation

Previous Previous post: Authy to Manage all your Google Authenticator accounts
Next Next post: Canva – Online Photo Editor

Currently Trending

  • Windows Vista CD key
  • How to download Specific parts of YouTube videos
  • How to Increase Dropbox upload speed
  • ZooZooo - Vodafone Logos
  • Highlight Author Comment in Blogspot
  • How To Change Windows XP Shutdown Dialog Box
  • How to Change the Welcome/Login Screen in Windows XP ?
  • HORIZONTAL AND VERTICAL SPACING
  • Add Three New Widgets At The Bottom or Header Of Blogger/Blogspot Blog
  • How to show hidden files and folders in Mac OS X

Random Posts

Setting Up Code Blocks

February 7, 2011 By Ritesh Sanap Leave a Comment

Display number of Facebook fans in full text on your WordPress blog

January 20, 2012 By Ritesh Sanap 4 Comments

Orkut Keyboard Shortcuts

August 11, 2008 By Ritesh Sanap Leave a Comment

How to Remove Curly Quotes

February 27, 2011 By Ritesh Sanap Leave a Comment

Record – blogger Template

June 24, 2010 By Ritesh Sanap 1 Comment

WordPress

HTTP2 Server Push for W3 Total Cache Minify plugin

August 17, 2016 By Ritesh Sanap 5 Comments

How to Disable Emojis in WordPress

January 6, 2016 By Ritesh Sanap Leave a Comment

JetPack Related posts and Sharing not working with NGINX

November 10, 2015 By Ritesh Sanap Leave a Comment

Simply Pure – WordPress Theme

November 2, 2014 By Ritesh Sanap 2 Comments

Advanced What should we Write about next? – WordPress Plugin

July 28, 2014 By Ritesh Sanap Leave a Comment

How to Disable Self Pingback or TrackBack

January 16, 2014 By Ritesh Sanap Leave a Comment

BlueStrap – WordPress Theme

January 1, 2014 By Ritesh Sanap 15 Comments

How to Create Multiple Excerpts in WordPress

December 24, 2013 By Ritesh Sanap Leave a Comment

How to Disable Auto Update in WordPress

November 21, 2013 By Ritesh Sanap Leave a Comment

How to Delete Feedbacks from JetPack Contact Form

November 19, 2013 By Ritesh Sanap 9 Comments

Recent Posts

  • HTTP2 Server Push for W3 Total Cache Minify plugin
  • How to show hidden files and folders in Mac OS X
  • How to Disable Emojis in WordPress
  • Canva – Online Photo Editor
  • JetPack Related posts and Sharing not working with NGINX

Archives

Recommends

  • DigitalOcean – Cloud Hosting
  • Dropbox – Cloud Storage
  • Elegant Themes – WordPress Themes
  • LastPass – Password Manager
  • Like us on Facebook
  • Follow on Twitter
  • +1 on Google
  • Subscribe via Email
  • RSS Feed

© 2021 Best 2 Know · All Rights Reserved · We ♥ DigitalOcean

loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.