How to update my own theme from my own server?
I’ve been working on my own WordPress Theme, very simple stuff and it’s working as expected. But i’d like to release new versions of my theme and send it to my own server to be able to update it on the WordPress dashboard just like I do with plugins or other themes (like when I buy from themeforest).
Why I’m developing my own theme?
I have a web agency and I have many clients. For each client I develop their own theme, this way I’m not using those "All purpouse theme" that loads unecessary stuff. Also I can create things the way I want.
So I have my own website, that I’m using to host all my clients themes zip files, for example, on this folder here
https://example.com/assets/themes I have many .zip files:
What I want is to upload a new zip file, let’s say
first-client-1.2.0.zip to my own website folder, and then I go to
https://firstclient.com/wp-admin and update the theme there.
On my development environment, I’m using Grunt to automate all this process, where I’ll compile sass and js files, bundle everything, zip the theme and send it to my own server, ex.:
But when I go to my client website dashboard, I’m not seeing the theme with the new version to be updated. What do I need to do? Do I need to create a new function under
functions.php to check for updates?
I already tried to change the versions on the readme.txt and also on the style.css comments, wich is used to gather theme information displayed on the theme section of wordpress.
This is what the
style.css file looks like:
/* Theme Name: Client_Name Text Domain: client-name Version: 1.2.0 Requires at least: 5.5 Requires PHP: 7.2 Description: My description Tags: my-tag Author: Author Name Author URI: https://example.com Theme URI: https://example.com/assets/themes/ License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html */