---
title: Automatic Updates for Plugins and Themes Hosted Outside WordPress Extend
date: 2010-07-11T12:21:44+00:00
modified: 2012-02-14T16:07:46+00:00
permalink: https://kaspars.net/blog/automatic-updates-for-plugins-and-themes-hosted-outside-wordpress-extend
post_type: post
author:
  name: Kaspars
  avatar: https://reverse.kaspars.net/gravatar/avatar/92bfcd3a8c3a21a033a6484d32c25a40b113ec6891f674336081513d5c98ef76?s=96&d=mm&r=g
post_tag:
  - Plugin
  - Snippet
  - Theme
category:
  - WordPress
---

# Automatic Updates for Plugins and Themes Hosted Outside WordPress Extend

Here are [two sample scripts](https://kaspars.net/wp-content/uploads/2010/07/automatic-theme-plugin-update.zip) along with an API to provide automatic updates for plugins and themes you host on your own server.

Inside `/api` you’ll find `index.php` which processes all the update requests. You should place this in something like `http://updates.example.com` and update `$api_url` in `/plugin/test-plugin-update/test-plugin-update.php` and `/theme/portfolio-racer/inc/updates.php` accordingly. If you activate these sample plugins without changing API URL, updates will be checked against my test server. If you decide to update, both plugin and theme will be replaced with exactly the same version of each.