{"id":255,"date":"2026-01-07T04:18:01","date_gmt":"2026-01-07T04:18:01","guid":{"rendered":"https:\/\/www.kwwd.co.uk\/blog\/?p=255"},"modified":"2026-01-07T04:23:46","modified_gmt":"2026-01-07T04:23:46","slug":"yamtrack-to-wp","status":"publish","type":"post","link":"https:\/\/www.kwwd.co.uk\/blog\/yamtrack-to-wp\/","title":{"rendered":"Yamtrack To WordPress Sync"},"content":{"rendered":"<p>If you&#8217;re a fan of films and TV you&#8217;ll probably keep track of what you&#8217;re watching. While there are online services such as Trakt and Simkl some might want a bit more control over their watch history \u2014 especially when you factor in the price of some of these tracking services.<\/p>\n<p>That&#8217;s where Yamtrack comes in.<\/p>\n<p>It&#8217;s an open source self-hosted media tracking server which runs in a docker instance and can track a variety of media including TV shows, movies, anime, games, books and more \u2014 you can even add your own media types if you want!<\/p>\n<p>If you&#8217;re interested in running your own media tracking server you can find out <a href=\"https:\/\/github.com\/FuzzyGrim\/Yamtrack\" target=\"_blank\" rel=\"noopener\">more information about Yamtrack here<\/a>.<\/p>\n<h3>The Problem: A Missing Link in Media Tracking<\/h3>\n<p>Up until recently I was a VIP member of Trakt and this gave me the ability to display a &#8220;Recently Watched&#8221; widget on my <a href=\"https:\/\/www.whatkatyreviewednext.com\" target=\"_blank\" rel=\"noopener\">Reviews Website<\/a> which I thought was a nice addition so that my readers could see what I might be reviewing next. But when Trakt announced their 100% price hike for current members I knew I had to find an alternative and while there are other good services out there, none quite worked exactly the way I wanted.<\/p>\n<p>Then I found Yamtrack.<\/p>\n<p>Yamtrack is\u00a0 a fantastic, lightweight way to keep a pulse on what you&#8217;re watching. However, as a former Trakt user, I noticed a frustrating gap: there was no easy way to automatically display my &#8220;Recently Watched&#8221; activity on my own website as I had been previously.<\/p>\n<p>I wanted a simple widget or a line of text on my site that said, &#8220;Hey, I just finished watching X,&#8221; without me having to manually update it every time I hit the sofa.<\/p>\n<h3>The Solution: Yamtrack To WordPress Sync<\/h3>\n<p>After searching for a plugin and finding nothing, I decided to build it myself.<\/p>\n<p><strong>Yamtrack To WordPress Sync<\/strong> is a lightweight WordPress plugin that creates a secure bridge between your Yamtrack data and your WordPress site. It doesn&#8217;t bloat your site with heavy scripts; instead, it uses a simple Python middleman to &#8220;ping&#8221; your site whenever your watch history updates.<\/p>\n<h3>How It Works<\/h3>\n<p>The system consists of two small parts:<\/p>\n<ol>\n<li><strong>The WordPress Plugin:<\/strong> Handles the display and provides a secure API endpoint.<\/li>\n<li><strong>The Python Script:<\/strong> A tiny script you run on your computer (or a server\/Raspberry Pi) that watches your Yamtrack feed and tells WordPress when something changes.<\/li>\n<\/ol>\n<h3>Key Features<\/h3>\n<ul>\n<li><strong>Shortcode Support:<\/strong> Use [kwwd_show_yamtrack_last_watched] anywhere-in your sidebar, footer, or on a dedicated &#8220;Now Watching&#8221; page.<\/li>\n<li><strong>Automatic Timezones:<\/strong> The plugin respects your WordPress General Settings, so the &#8220;Watched at&#8221; time always looks correct for your local time.<\/li>\n<li><strong>Privacy First:<\/strong> You generate a unique Secret Key so only your script can update your site.<\/li>\n<li><strong>Performance:<\/strong> Images are processed server-side to ensure your site stays fast for visitors.<\/li>\n<\/ul>\n<p>Here it is in action:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-256 size-large\" src=\"https:\/\/www.kwwd.co.uk\/blog\/wp-content\/uploads\/2026\/01\/yamtrack-to-wp-example-1024x540.png\" alt=\"Yamtrack to WordPress widget shown in a website's sidebar\" width=\"819\" height=\"432\" srcset=\"https:\/\/www.kwwd.co.uk\/blog\/wp-content\/uploads\/2026\/01\/yamtrack-to-wp-example-1024x540.png 1024w, https:\/\/www.kwwd.co.uk\/blog\/wp-content\/uploads\/2026\/01\/yamtrack-to-wp-example-300x158.png 300w, https:\/\/www.kwwd.co.uk\/blog\/wp-content\/uploads\/2026\/01\/yamtrack-to-wp-example-768x405.png 768w, https:\/\/www.kwwd.co.uk\/blog\/wp-content\/uploads\/2026\/01\/yamtrack-to-wp-example.png 1448w\" sizes=\"auto, (max-width: 819px) 100vw, 819px\" \/><\/p>\n<h3>How to Get It<\/h3>\n<p>I&#8217;ve made the entire project Open Source. Whether you&#8217;re a developer who wants to tweak the code or just someone who wants their site to look a bit more &#8220;live,&#8221; you can grab it today.<\/p>\n<p><a href=\"https:\/\/github.com\/KWWDCoding\/kwwd-yamtrack-sync-for-wp\/releases\" target=\"_blank\" rel=\"noopener\"><strong>Download the latest release from Gitbub here<\/strong><\/a><\/p>\n<h3>Quick Start: The 3-Minute Setup<\/h3>\n<p>Once you&#8217;ve installed the plugin on WordPress, you only need to configure one file to get the sync moving. Here is exactly what to do:<\/p>\n<h4>1. The Ingredients<\/h4>\n<p>You will need two pieces of information from your WordPress <strong>Settings &gt; Yamtrack Sync<\/strong> page:<\/p>\n<ul>\n<li><strong>Your Secret Key:<\/strong> (Keep this private!)<\/li>\n<li><strong>Your API URL:<\/strong> (e.g., https:\/\/your-site.com\/wp-json\/update\/v1\/yamtrack)<\/li>\n<\/ul>\n<p>If you download the zip file from the settings page these variables are already automatically added to your python script. If you&#8217;re editing the script manually you can find this information at the bottom of the plugin setting page.<\/p>\n<h4>2. Configure the Python Script<\/h4>\n<p>Your secret key and API URL should be auto-configured but you will need to ensure that the path to your database folder is set correctly:<\/p>\n<pre><code class=\"language-php\">\r\n# --- CONFIGURATION ---\r\n# Replace these with the values from your WordPress Admin panel\r\nWP_URL = '[should be auto-filled]' \r\nSECRET_KEY = '[should be auto-filled]'\r\n\r\n# The full path to the folder containing your Yamtrack db.sqlite3\r\n# Example: '\/home\/docker\/yamtrack'\r\nDB_PATH = '\/path\/to\/your\/yamtrack\/databasefolder' \r\n<\/code><\/pre>\n<p>If you need help finding your Database Path you can run the following command from your Yamtrack server command line:<\/p>\n<p><code class=\"language-php\">Type: find \/ -name \"db.sqlite3\" 2&gt;\/dev\/null<\/code><\/p>\n<p>You can change the database name if needed here too but if you ran the default Yamtrack install you should be good to go<\/p>\n<h4>3. Upload Your Python Script<\/h4>\n<p>Upload your python script to your Yamtrack server. You can store it anywhere but I&#8217;d recommend adding it to your main Yamtrack folder to keep things neat and tidy.<\/p>\n<p>The default Yamtrack install location is:<\/p>\n<p><code class=\"language-php\">\/home\/[YourServerName]\/Yamtrack<\/code><\/p>\n<h4>4. Run An Initial Sync<\/h4>\n<p>From your Yamtrack server command line run your first sync by entering:<\/p>\n<p><code class=\"language-php\">python3 \/home\/[YourServerName]\/Yamtrack\/yam_to_wp.py<\/code><\/p>\n<p>If you get a &#8220;permission denied&#8221; error, run the above command as Sudo and enter your password when prompted<\/p>\n<p>The required files to track changes will be created and your WordPress site should be &#8220;pinged&#8221;. If you&#8217;ve already added the shortcode to your site, on refreshing your last watched TV show or Movie should now be displayed!<\/p>\n<h4>5. Set A Schedule<\/h4>\n<p>In order to tell WordPress that you&#8217;ve watched something new you&#8217;ll need to schedule the python script to run on a schedule.<\/p>\n<p>I recommend 15 minutes but you can change the frequency if you wish.<\/p>\n<p>The schedule is run through Linux&#8217;s inbuilt cron functionality. To enable this:<\/p>\n<pre><code class=\"language-php\">1. Type: crontab -e (if you're running this for the first time, select nano as that's the easiest editor)\r\n2. Scroll to the bottom and paste this line (adjusting the path):\r\n# Format: Minute Hour Day Month DayOfWeek Command\r\n# This runs every 15 minutes:\r\n*\/15 * * * * \/usr\/bin\/python3 \/path\/to\/your\/folder\/yam_to_wp.py &gt;&gt; \/path\/to\/your\/folder\/sync.log 2&gt;&amp;1\r\n\r\n3. CTRL+O, then Enter to save the file\r\n\r\n4. CTRL+X to exit the nano editor<\/code><\/pre>\n<p><strong>And that&#8217;s it<\/strong>! Your watch history will be checked every 15 minutes and if anything has changed it&#8217;ll update your WordPress site &#8211; nice!<\/p>\n<h3>Pro-Tips for a Smooth Experience<\/h3>\n<ul>\n<li><strong>Always On:<\/strong> For the best results, run this script on a device that stays on, like a Home Server, a Raspberry Pi, or even an old laptop.<\/li>\n<li><strong>The Shortcode:<\/strong> To show your data to the world, just paste <code>[kwwd_show_yamtrack_last_watched]<\/code> into any Page, Post, or Widget.<\/li>\n<li><strong>Custom Styling:<\/strong> The output is wrapped in a CSS class called <code>.kwwd-yamtrack-display<\/code>. If you know a little CSS, you can make it match your theme perfectly if the supplied style options don&#8217;t work for you.<\/li>\n<\/ul>\n<h3>Troubleshooting (Read this before panicking!)<\/h3>\n<ul>\n<li><strong>&#8220;Script says 401 Unauthorized&#8221;:<\/strong> This means your SECRET_KEY in the Python script doesn&#8217;t match the one in your WordPress settings. Copy-paste them again to be sure.<\/li>\n<li><strong>&#8220;SSL Error&#8221;:<\/strong> If you are testing on a local site (like localhost or .localdev) without an SSL certificate, the script might struggle to connect. This plugin is designed for live sites with https:\/\/.<\/li>\n<li><strong>Images not showing:<\/strong> Ensure your WordPress &#8220;Uploads&#8221; folder is writable. The plugin saves a local copy of the artwork to keep your site loading fast!<\/li>\n<\/ul>\n<h3>Reporting Issues Or Requesting Functionality<\/h3>\n<p>If you come across any bugs or have a feature request you can <a href=\"https:\/\/github.com\/KWWDCoding\/kwwd-yamtrack-sync-for-wp\/issues\" target=\"_blank\" rel=\"noopener\">create an issue\/feature request on\u00a0 Github<\/a> (you&#8217;ll need an account to post, don&#8217;t worry it&#8217;s free!)<\/p>\n<h3>Supporting the Project<\/h3>\n<p>I wrote this because I needed it, and I&#8217;m sharing it because I think others might too. If you find it useful or it saves you a few hours of coding, feel free to<a href=\"https:\/\/ko-fi.com\/kwwdcoding\" target=\"_blank\" rel=\"noopener\"> <strong>support me on Ko-Fi<\/strong><\/a> or share the plugin on social media and with your friends.<\/p>\n<p>Happy watching and happy tracking!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re a fan of films and TV you&#8217;ll probably keep track of what you&#8217;re watching. While there are online services such as Trakt and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[63,3],"tags":[65,64,9,55,12],"class_list":["post-255","post","type-post","status-publish","format-standard","hentry","category-plugins","category-wordpress","tag-free","tag-open-source","tag-php","tag-plugin","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.kwwd.co.uk\/blog\/wp-json\/wp\/v2\/posts\/255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kwwd.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kwwd.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kwwd.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kwwd.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=255"}],"version-history":[{"count":0,"href":"https:\/\/www.kwwd.co.uk\/blog\/wp-json\/wp\/v2\/posts\/255\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.kwwd.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kwwd.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kwwd.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}