How to host your WordPress theme on github and make my theme updatable for my client

I'm currently developing an WordPress theme for a client of mine. I want it to be hosted on GitHub, so my client can update the theme whenever I release a new update of the theme. The problem is that I don't know how to host a theme on GitHub and have a private key saved in the code somewhere, without anyone can see it. Can someone help me out? Thanks in advance!
Category: Web

Is it a good idea to make Wordpress theme repository public?

I have my custom Wordpress+Woocommerce theme created that I want to show on my github page as a reference. The theme does not contain any login data. Of course it contains server-side php code that shows how the client page is created. I always tried to structure the logic according to other themes/according to how code inside Woocommerce plugin works. Is there a security danger for the site when making the theme source public?
Category: Web

GitHub plugins safe to use in my website?

I have some question about GitHub files, I hope it is a proper place to ask. I downloaded the gravity forms from https://github.com/wp-premium/gravityforms You may know that the plugin itself is sold by min price 59$/year in its website https://www.gravityforms.com/pricing I am surprised if it is not free in the original website, how it can be downloaded for free at GitHub? Do you think I can use the version from GitHub without any stability and safety issues? Thanks
Category: Web

What is the correct way to set up a staging server and use github for version control?

I have Wordpress site at /var/www/contoso/html (contoso.com) running on a CentOS 8 server. I would like to run a new theme and make some frontend changes to it to make it match the look and feel of the old theme. I imagine that using a staging instance is the way to go. Is the proper approach to copy site files to /var/www/contoso-staging/html (dev.contoso.com) and use a copy of the database? Or would it be possible to simply create a read-only …
Category: Web

Wordpress GitHub Workflow

I currently have a WordPress GitHub workflow that is the following: Development is done locally -> committed to the GitHub repository -> is pushed to the dev WP site/admin panel -> QA'd -> merged with the Production Github branch to push live to the Prod WP site/admin panel. The client would like to be able to create changes in the WP admin panel (adding new plugins) then commit those to the rest of the GitHub repository so that when I …
Category: Web

Wordpres core-update theme renames theme folder name

I've got a theme that checks for a new version on GitHub. When it finds a new version it downloads it and install it. The problem is that it installs the theme with a different folder name than previous. Resulting errors. I call the updater with hook pre_set_site_transient_update_themes In it I check the GitHub api with: https://api.github.com/repos/my-name/my-repo/releases/latest I set the update package variable with https://api.github.com/repos/my-name/my-repo/zipball/0.1.0 Where 0.1.0 is the latest version. So if I install a theme manually the theme …
Category: Web

GitHub .md files to WordPress pages

I saw some websites that manage their information/documentation in a GitHub repository. This allows everyone to create issues if something is wrong or outdated, propose changes by forking/request push etc. Is it possible to link WordPress to a GitHub repository? Expected behavior: every .md-file in the repository becomes a page (or post) in WordPress (ideally keeping the markdown layout). When a change is made in the GitHub repository, the changes should immediately reflect in WordPress.
Category: Web

How to persist custom posts, custom fields and styles on a Github repository?

I need to send a code to a third person through Github with custom posts and custom fields for them just add the posts. I have tried to find this approach online but I could not find the answer since all of them just talk about version control between local and production WP. I am using MAMP, ACF and Custom Post Type UI to develop the site, linking the custom fields to custom post.
Category: Web

Generate pages from markdown files in github automatically

I have a lot of markdown documents stored in GitHub. The .md documents change often so it is difficult to track changes. What I am currently doing is create a template and read content from the URL and insert into my template to get in the proper format. What I want to do now is - Github MD files should be converted as a page in my Wordpress site automatically. It should get updated when GitHub is updated. it would …
Category: Web

how to embed or share a gits in my blog wordpress?

I am new in worpdress but I would like to share my code gits in my blog wordpress. so then I made a gits in github: (this code it is just a example for this question) but when I try to share my gits in wordpress I got this: does anyone know how I can fix that and share my code in wordpress? note:** my blog wordpress is in a hosting web i dont use the platform from wordpress I …
Category: Web

How-to: push a GitHub repo to the wordpress plugin servers

I develop my plugin over on github but when it comes to deployment I have to somehow copy my changes into the Wordpress SVN. Currently I do this manually and copy over each file in each directory individually, but this is time consuming and error prone. I have seen and tried a few scripts but I think I must be running them wrong as they either error or don't copy over the files correctly. So my question is has anyone …
Category: Web

Can I put in Github the code of a abandoned plugin I want to fork?

My friends. I want to know if I can create a repository of abandoned plugin of wp.org that the author is not mantaining make 2 years. The plugin is this: https://br.wordpress.org/plugins/send-emails-for-woocommerce/ I just want to know if I will have problem with the law if I put it in the Github because is a third party plugin, even if I mantain the author in the readme.txt. Thanks! Edit: https://wordpress.org/support/topic/can-i-takeover-this-plugin-it-seems-to-be-abandoned-after-2-years-w-o-update/
Category: Web

How to use one git (github) repository for version control for multiple themes

I have built and maintain many themes for various clients. I'd like to be able to put them all in github for lovely version control. However github gets a bit expensive when you have over 20 private repositories. I'm going to have about 30+. The themes are not used together, each one is for a separate client. I know I can host my own git install, but then I lose the great diff tools and social aspects of github. It's …
Category: Web

Custom theme updater - random string in new theme name

I am making a theme that will be updateable via github. https://github.com/pallazzio/skeleton I am trying to use the plugin updater tutorial from smashing magazine, modified for updating a theme instead. https://www.smashingmagazine.com/2015/08/deploy-wordpress-plugins-with-github-using-transients/ I got it almost working. The update gets downloaded and installed to the correct folder. However, instead of leaving the same theme active, it is activating a new theme whose name is pallazzio-skeleton-b203a7f. The weird part is that there is no folder created with that name. The files get …
Category: Web

GIT and Development URL's point to production

I am experimenting with GIT for version control. I have a production environment that I created a repo for HERE, then did a git clone locally. I created/modified the wp-config to work with my local DB. The index page loads, but all of the links for any pages or post point to the production URLs. How can I make this so running the local instance allows me to browse to all the local pages/posts?
Category: Web

WordPress Premium Plugin (3rd Party Github User)

I just started to setup my WordPress worklow with Composer. After hours of research I found a Github User, that is hosting "some" Premium Plugins on his Account. My Question's are: It is allowed? Can I use this Repos for my Composer Setup? Should I use this? Why nobody notice that?
Category: Web

How to handle a GitHub webhook POST request?

I'd like to start by saying that I wasn't sure if this was the right place to post this question, so if it isn't please point me in the right direction. Ok, so I have a GitHub webhook that is triggered whenever there's a commit comment and I can't figure out how to handle it in my Wordpress website. I won't go into detail of what I want to do with it because first I have to receive a response …
Category: Web

Git ignore everything except custom theme directory

I only just started trying to use GitHub with WordPress, so I'm completely new to everything git. My problem is simple: I want to setup my .gitignore so git ignores absolutely everything except my Wordpress theme which is located at a custom directory '/goods/themes/my-wordpress-theme'. I've tried a variety of .gitignore files such similar to the following and nothing works. # Ignore everything * # Except 'my-wordpress-theme' !goods/themes/my-wordpress-theme/* I'm running Ubuntu with git version 2.7.4 Please help! Thanks, Asher.
Category: Web

Git Hosting for WordPress SVN Plugin Repository

I'm setting up my first WordPress plugin on the WordPress.org Plugin Site. Behind the scenes, developers add plugins to this site via an SVN repository. Is the any tooling (supported by Automattic and/or third party) that would allow me to seamlessly manage this svn repository via git and/or GitHub? i.e. I'd like my "source of truth" for a Plugin's source to be GitHub, and for me to hit a button and/or run a cron script and have the plugin automatically …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.