Skip to content

Instantly share code, notes, and snippets.

View kengitahi's full-sized avatar

Kennedy Gitahi kengitahi

View GitHub Profile
@kengitahi
kengitahi / README.md
Created March 17, 2025 01:35 — forked from markshust/README.md
GitHub Action to deploy Laravel app

Set up GitHub Actions to handle deployments for your Laravel application. This has similar functionality to Laravel Forge without the recurring cost. GitHub Actions can be used to automate your deployment process on every push to your repository.

Prerequisites

  1. Server Access: Ensure you have SSH access to your server where the Laravel app will be deployed.
  2. Secrets: Store sensitive information such as your server's IP address, SSH username, and private SSH key in GitHub Secrets. Go to your GitHub repository, navigate to "Settings" > "Secrets and variables" > "Actions", and add the following secrets:
    • DEPLOY_SERVER_IP: Your server's IP address.
    • DEPLOY_SERVER_USER: Your SSH username.
    • DEPLOY_SERVER_KEY: Your private SSH key. Make sure this key is authorized to access your server (~/.ssh/authorized_keys).
  • DEPLOY_SERVER_DIR: The directory where you'd like to deploy your app, relative to /var/www/. Ex: example.com
@kengitahi
kengitahi / wp_rss_feed_add_to_post_w_thumbs.php
Created December 1, 2019 12:24 — forked from sotospeak/wp_rss_feed_add_to_post_w_thumbs.php
Adding a feed to WP posts, scraping the featured images when thumbnails missing from feed
//put your feed in post/page with
//[add_rss url = "my feed uri"
//items = "number of items to retrieve"
//title = "title for"
//show_date = "show date or not"
//show_author "show author or not"
//show_summary = "whether to show a summary of each item"]
//declare the function
//from the original wp_widget_rss_output
//bit customized
@kengitahi
kengitahi / Readme.md
Created October 9, 2018 00:17 — forked from ErikCH/Readme.md
@kengitahi
kengitahi / Readme.md
Created October 9, 2018 00:17 — forked from ErikCH/Readme.md
@kengitahi
kengitahi / solved.txt
Created July 25, 2018 22:49 — forked from yozzi/solved.txt
SOLVED! WORDPRESS ASKING FOR LOCAL FTP CREDENTIALS ON XAMPP
SOLVED! WORDPRESS ASKING FOR LOCAL FTP CREDENTIALS ON XAMPP
A few developers were asking why their localhost instances of WordPress were asking for FTP credentials when trying to install new plugins and themes. If you’re getting the dreaded “Please enter your FTP credentials” page and you’re running XAMPP for your local WP development environment, do not follow the popular StackOverflow answer that tells you to chown your wordpress folder to _www. Read more for the real fix.
There’s a Stackoverflow page that tells you to chown your local environment to www, but according to the <a href=“http://www.apachefriends.org/en/xampp-macosx.html” target=“blank”>recent XAMPP documentation, Apache is running as user ‘daemon.’
So the fix is to go into your Terminal and cd to your local directory. If you develop a lot of wordpress stuff at the same time, you can just chown your htdocs directory (remember that you should never use XAMPP as a production environment, which means you should never follow these ideas for live