About Synchronization

In this article, I will talk about how your Shop data is synced with your database. When you start a synchronization in your backend, the plugin will check different resources in your Spreadshirt Shop and create a corresponding item in your shop.

What datatypes are synced?

Spreadshirt resources map to different WordPress object types, like Custom Post Types and Taxonomies. In the plugin, this relationship is called an Entity.

For example the Entity article maps Spreadshirt articles to as Custom Post Type called sfw-product.

For details please check the post about datatypes and entities.

How long does the Synchronization take?

Currently you should expect it to take approximately 2 seconds per Article plus 3 minutes. We will look into ways to improve this in a future version. Speed depends much on your settings and server, as you will read below.

However, this only applies to Articles that actually need a Synchronization. A Synchronization is needed when:

  1. the Resource is added for the first time ( “created” )
  2. every Resource expires after a defined amount of time, that is different by the type of Resource.
  3. Updates may be forced by after Plugin updates
  4. Updates may be forced via the option checkbox at the Synchronization Screen

Does Synchronization happen automatically?

No, currently not. The Plugins goal is full control for the shop owner. For this reason we will never add new Articles to your shop without explicit action on your side. However, in a future release we may add automatic updates in some situations.

How often should I perform a Synchronization?

We recommend to run a Synchronization every time you change something in your shop on the Spreadshirt platform. We recommend to occasionally perform a Synchronization to get rid of removed Articles. This most likely will be automated in the future, as soon as we fully understand how the API handles removed Articles.

When the Synchronization fails

To help debugging errors on the Synchronization Screen, please make sure to check the Synchronization section in our Troubleshooting Guide.

A frequent reason may be a Server Timeout. This can either happen on your own Server or when you make too much requests to the Spreadshirt API.

By default all Synchronization tasks are throttled at 500 milliseconds. For example this means the script will pause for 500ms between the synchronization of two articles. You can change these values on the settings page.

Tipp: If you think your server can handle it, you can use reduce the timeout values to speed up the Synchronization!

Remember that the actual frequency of API calls can be much higher, especially if your Shop has high traffic or multiple shops are hosted on the same server. If you experience recurring problems, you may want to contact your webhost ( in case of local timeouts ) or Spreadshirt ( in case the API denies your requests ).