{"id":20441943,"url":"https://github.com/austinjhunt/jerrywestonmize","last_synced_at":"2026-05-16T18:33:33.351Z","repository":{"id":195219869,"uuid":"672655544","full_name":"austinjhunt/jerrywestonmize","owner":"austinjhunt","description":"WordPress content managed with Git for jerrywestonmize.com, a website I manage for a freelance client","archived":false,"fork":false,"pushed_at":"2026-05-10T14:53:34.000Z","size":371586,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-10T16:33:43.157Z","etag":null,"topics":["wordpress"],"latest_commit_sha":null,"homepage":"https://jerrywestonmize.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/austinjhunt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-07-30T20:15:40.000Z","updated_at":"2026-05-10T14:53:38.000Z","dependencies_parsed_at":"2025-08-02T02:47:40.315Z","dependency_job_id":null,"html_url":"https://github.com/austinjhunt/jerrywestonmize","commit_stats":null,"previous_names":["austinjhunt/jerrywestonmize"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/austinjhunt/jerrywestonmize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinjhunt%2Fjerrywestonmize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinjhunt%2Fjerrywestonmize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinjhunt%2Fjerrywestonmize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinjhunt%2Fjerrywestonmize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/austinjhunt","download_url":"https://codeload.github.com/austinjhunt/jerrywestonmize/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinjhunt%2Fjerrywestonmize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33114246,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["wordpress"],"created_at":"2024-11-15T09:36:14.626Z","updated_at":"2026-05-16T18:33:33.332Z","avatar_url":"https://github.com/austinjhunt.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jerrywestonmize.com\r\n\r\n## Colibri Theme Update Documentation\r\n\r\nWhen you update the theme, theme file edits are cleared away. These modifications need to be added back after updating the colibri theme.\r\n\r\n### `header.php`\r\n\r\n```\r\n\r\n\u003c!DOCTYPE html\u003e\r\n\u003chtml \u003c?php language_attributes(); ?\u003e\u003e\r\n\u003chead\u003e\r\n    \u003cmeta charset=\"\u003c?php bloginfo( 'charset' ); ?\u003e\"\u003e\r\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\"\u003e\r\n    \u003clink rel=\"profile\" href=\"http://gmpg.org/xfn/11\"\u003e\r\n\t\u003c?php acf_form_head();?\u003e // THIS IS WHAT YOU NEED TO RE-ADD\r\n    \u003c?php wp_head(); ?\u003e\r\n    \u003c?php colibriwp_theme()-\u003eget( 'css' )-\u003erender(); ?\u003e\r\n\u003c/head\u003e\r\n\r\n\u003cbody id=\"colibri\" \u003c?php body_class(); ?\u003e\u003e\r\n\u003c?php\r\nif ( function_exists( 'wp_body_open' ) ) {\r\n    wp_body_open();\r\n} else {\r\n    do_action( 'wp_body_open' );\r\n}\r\n?\u003e\r\n\r\n\r\n\u003cdiv class=\"site\" id=\"page-top\"\u003e\r\n    \u003c?php colibriwp_theme()-\u003eget( 'header' )-\u003erender(); ?\u003e\r\n\r\n```\r\n\r\n### `functions.php`\r\n\r\n```\r\n\r\n// begin mods\r\n// change the logout url\r\nadd_filter('logout_url', 'jwm_logout_url');\r\nfunction jwm_logout_url($default)\r\n{\r\n\t// set your URL here\r\n\t// // Parse the URL into its components.\r\n\t$parsedUrl = parse_url($default);\r\n\r\n\t// Get the query string from the parsed URL.\r\n\t$queryString = $parsedUrl['query'];\r\n\r\n\t// Remove the leading question mark from the query string.\r\n\treturn 'https://jerrywestonmize.com/jwmsecure.php?' . $queryString;\r\n}\r\n\r\n// change login url - added on 1/6/2024 becaus login form began redirecting\r\n// to default wp-login.php?redirect_to ... after submission\r\nadd_filter('login_url', 'jwm_login_url');\r\nfunction jwm_login_url($default) {\r\n\t$parsedUrl = parse_url($default);\r\n\t$queryString = $parsedUrl['query'];\r\n\treturn 'https://jerrywestonmize.com/jwmsecure.php?' . $queryString;\r\n}\r\n\r\n// change the forgot password URL on login page\r\nfunction jwm_lostpassword_url()\r\n{\r\n\treturn 'https://jerrywestonmize.com/jwmsecure.php?action=lostpassword';\r\n}\r\nadd_filter('lostpassword_url', 'jwm_lostpassword_url');\r\n\r\n// change the reset password link in the email you get after clicking forgot password\r\nfunction custom_reset_password_message($message, $key, $user_login, $user_data)\r\n{\r\n\t// Check if the message contains the URL we want to replace\r\n\tif (strpos($message, 'wp-login.php?action=rp') !== false) {\r\n\t\t$user_locale = get_user_meta($user_data-\u003eID, 'locale', true);\r\n\t\t$wp_lang = !empty($user_locale) ? $user_locale : 'en_US';\r\n\t\t// Construct the new URL\r\n\t\t$new_url = 'https://jerrywestonmize.com/jwmsecure.php?action=rp\u0026key=' . $key . '\u0026login=' . rawurlencode($user_login) . '\u0026wp_lang=' . $wp_lang;\r\n\r\n\t\t$old_url = 'https://jerrywestonmize.com/wp-login.php?action=rp\u0026key=' . $key . '\u0026login=' . rawurlencode($user_login) . '\u0026wp_lang=' . $wp_lang;\r\n\t\t// Replace the old URL with the new URL\r\n\t\t$message = str_replace($old_url, $new_url, $message);\r\n\t}\r\n\r\n\treturn $message;\r\n}\r\nadd_filter('retrieve_password_message', 'custom_reset_password_message', 10, 4);\r\n\r\n// change the behavior after log out completion (default redirects to wp-login.php)\r\nadd_action('wp_logout', 'jwm_logout_complete');\r\n\r\nfunction jwm_logout_complete()\r\n{\r\n\twp_redirect(site_url());\r\n\texit();\r\n}\r\n\r\nadd_action('after_setup_theme', 'remove_admin_bar');\r\nfunction remove_admin_bar()\r\n{\r\n\tif (!current_user_can('administrator') \u0026\u0026 !is_admin()) {\r\n\t\tshow_admin_bar(false);\r\n\t}\r\n}\r\n\r\n// end of mods\r\n\r\nadd_action('after_switch_theme', 'colibriwp_check_php_version');\r\n......\r\n\r\n```\r\n\r\n## Payment Receipts - Amelia Code Modification\r\n\r\nIf the Amelia plugin is updated, there is a chance this code will need to be re-added.\r\n\r\nAmelia doesn't properly trigger Stripe payment receipts because by default it does not tie in \"receipt_email\" key in the initial PaymentIntent creation API request to Stripe.\r\n\r\nTo fix this, I customized the logic of `wp-content/plugins/ameliabooking/src/Infrastructure/Services/Payment/StripeService.php` to add that `receipt_email` key with the value of the `Customer Email` metadata that Weston had already added under the Amelia \u003e Settings \u003e Payments \u003e Stripe \u003e Customer Metadata menu.\r\n\r\nThese are the specific changes to the [wp-content/plugins/ameliabooking/src/Infrastructure/Services/Payment/StripeService.php](wp-content/plugins/ameliabooking/src/Infrastructure/Services/Payment/StripeService.php) file:\r\n\r\n```\r\n...\r\n\r\nif ($stripeSettings['manualCapture']) {\r\n\t$stripeData['capture_method'] = 'manual';\r\n}\r\n\r\nif ($data['metaData']) {\r\n\t$stripeData['metadata'] = $data['metaData'];\r\n}\r\n\r\n...\r\n\r\n// BEGIN MODS\r\n\r\nif ($data['metaData']['Customer Email']) {\r\n\t$stripeData['receipt_email'] = $data['metaData']['Customer Email'];\r\n}\r\n// also added a fallback description since that was appearing as null on the Stripe side\r\nif ($data['description']) {\r\n\t$stripeData['description'] = $data['description'];\r\n} else {\r\n\t$stripeData['description'] = 'Payment for ' . $data['metaData']['Customer Name'] . ' - ' . $data['metaData']['Customer Email'] . ' - ' . $data['metaData']['Service'] . '';\r\n}\r\n// END MODS\r\n\r\n....\r\n\r\n$stripeData = apply_filters(\r\n\t'amelia_before_stripe_payment',\r\n\t$stripeData\r\n);\r\n\r\n$intent = PaymentIntent::create($stripeData);\r\n\r\n```\r\n\r\nAccording to these docs on the PaymentIntent API reference: [https://stripe.com/docs/api/payment_intents](https://stripe.com/docs/api/payment_intents), including a `receipt_email` will automatically trigger a receipt to be sent to that email upon the success of the payment intent. [https://stripe.com/docs/api/payment_intents/object#payment_intent_object-receipt_email](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-receipt_email)\r\n\r\n`receipt_email`: _Email address that the receipt for the resulting payment will be sent to. If receipt_email is specified for a payment in live mode, a receipt will be sent regardless of your email settings._\r\n\r\nTo test this, I deployed that update and did the following:\r\n\r\n1. Ensured Amelia is using the live keys\r\n2. Temporarily reduced the price of one of the paid services to $0.50 (minimum allowable charge with Stripe processing)\r\n3. Booked one of those lessons on the front end with my own debit card\r\n4. I got the lesson approved notification as normal, and within about 15 seconds I also got the receipt email from stripe.\r\n\r\n## WP Core Updates\r\n\r\nSince we are using a custom login file, and we deleted the default wp-login.php file (not included in this repository), be sure to always remove the wp-login.php file after running a WP Core update because that apparently re-adds that file back which opens an obvious vulnerability for WP attackers.\r\n\r\n## Monthly OS and WP Update Instructions for Weston\r\n\r\nBelow are instructions for patching the server and updating the site. This is currently done on a monthly schedule but can be done more frequently, particularly if urgent security updates are released.\r\n\r\nYou need to have SSH access to the server. I've created on additional user with sudo permissions (root-level permissions) and have shared credentials securely with Weston. This user account can be used to sign into the server, apply OS updates to the server, and apply code updates to the site.\r\n\r\n### Back Up Your Site Before Updating\r\n\r\nIt is always best practice to back up your site (media, code files, and database) before making any big changes (like updates). You can do this using the [Updraft Plus plugin](https://jerrywestonmize.com/wp-admin/options-general.php?page=updraftplus) which I have installed on your site for this purpose. You can simply use the \"Backup Now\" option before starting the updates.\r\n\r\n![creating a backup with updraft plus](./doc/updraft-backup.png)\r\n\r\n### Wordpress Dashboard Updates\r\n\r\n1. Sign into the [site dashboard](https://jerrywestonmize.com/jwmsecure) and apply all of the updates that are available. You'll see red badges indicating updates for plugins, themes, and also the core if there are any updates available. You can do this all from the dashboard. KEY NOTE: These updates make actual code changes to the site. You'll need to commit those changes to this project for version control.\r\n\r\n#### What are core updates?\r\n\r\nBy core update, I mean an update that looks like this:\r\n\r\n![core update screenshot](./doc/core-update.png)\r\n\r\n### Server OS Updates\r\n\r\n1. Log into the server via SSH. Open a terminal on your computer and enter `ssh \u003cusername\u003e@\u003cserver IP\u003e` - I am not posting either the username or the IP of the server publicly here but have shared them with Weston securely. Best never to share those details publicly, especially since the user has root level permissions.\r\n2. Once logged in, apply OS updates: `sudo apt update \u0026\u0026 sudo apt ugrade -y`. You'll need to enter your same password again for this.\r\n\r\n#### OS Updates May Prompt For Reboot\r\n\r\n1. You MAY or may not need to reboot the server for the update process. If you do, you'll see something like this when you log in with SSH.\r\n\r\n```\r\nWelcome to Ubuntu 22.04.4 LTS (GNU/Linux 5.15.0-105-generic x86_64)\r\n\r\n * Documentation:  https://help.ubuntu.com\r\n * Management:     https://landscape.canonical.com\r\n * Support:        https://ubuntu.com/pro\r\n\r\n System information as of Tue May 28 02:08:29 AM UTC 2024\r\n\r\n  System load:           0.06\r\n  Usage of /:            19.0% of 48.64GB\r\n  Memory usage:          34%\r\n  Swap usage:            81%\r\n  Processes:             117\r\n  Users logged in:       0\r\n  IPv4 address for eth0: 194.195.211.175\r\n  IPv6 address for eth0: 2600:3c02::f03c:93ff:fea3:881d\r\n\r\n\r\nExpanded Security Maintenance for Applications is not enabled.\r\n\r\n0 updates can be applied immediately.\r\n\r\n10 additional security updates can be applied with ESM Apps.\r\nLearn more about enabling ESM Apps service at https://ubuntu.com/esm\r\n\r\n\r\n*** System restart required ***\r\nLast login: Tue May 28 01:35:07 2024 from 47.27.66.20\r\njerrywestonmize@localhost:~$\r\n```\r\n\r\nNote the `System restart required` above `Last login`.\r\n\r\n2. If you see this, enter `sudo reboot now` and enter your password again. This will completely reboot the server, which will terminate your existing connection. Wait about a minute or so and then reconnect with that same `ssh ... ` command in your terminal.\r\n\r\n### Version Control Updates (Sync with GitHub)\r\n\r\n3. Enter: `sudo -i` (becomes root).\r\n4. Navigate to the site: `cd /var/www/jerrywestonmize`\r\n5. Run `git status` to list all of the changes (from the dashboard updates) that have yet to be staged and committed.\r\n6. Enter `git add .` to stage everything at once to be committed.\r\n7. Commit your changes with a descriptive commit message. Example: `git commit -m 'Colibri theme v1.2.3 update; WP Core 6.4.5 update; Amelia booking plugin v1.2.3 update`\r\n8. Push your changes to GitHub (this will sync the changes on your production server over to the repo on github.com used for centralized version control): `git push`\r\n9. Leave your terminal window with your SSH connection to the server open for now. You'll need to use it again in a moment.\r\n\r\n### Re-apply Custom Modifications to Amelia \u0026 Colibri \u0026 Login\r\n\r\n1. To do this part, it'll be easiest to use your local computer rather than trying to edit files over SSH. I recommend installing and using [Visual Studio Code](https://code.visualstudio.com/). Once installed, move to the next step.\r\n2. Open VS Code and open a terminal with Terminal \u003e New Terminal.\r\n3. Run `git clone https://github.com/austinjhunt/jerrywestonmize` to pull (clone) the code for your WordPress site from GitHub to your local computer. Then run `code jerrywestonmize` to open a new VSCode window inside that project. Alternatively you can use the `File \u003e Open Folder` menu in VSCode to open the `jerrywestonmize` folder you just pulled.\r\n4. Once you have a new VS Code window open inside the `jerrywestonmize` project, you need to apply the code changes documented in the top part of this README. Specifically [Colibri Theme Update Documentation](#colibri-theme-update-documentation) and [Payment Receipts - Amelia Code Modification](#payment-receipts---amelia-code-modification).\r\n5. After making those changes and saving the files with those changes, you need to sync those changes back to GitHub.\r\n6. Enter `git add .`\r\n7. Enter `git commit -m 're-apply custom modifications after code updates`\r\n8. Enter `git push`\r\n9. Now, the GitHub repo has the updated code as well as the necessary code customizations to achieve the functionality we designed specifically for your site.\r\n10. Move on to the last part.\r\n\r\n### Sync Customizations from GitHub to Production\r\n\r\n1. Hop back into your terminal window that you left open with your SSH connection to your production web server.\r\n2. Make sure you're still root (it should say `root@localhost`).\r\n3. Make sure you're in the right folder: `cd /var/www/jerrywestonmize`\r\n4. Pull the latest changes (code customizations you just pushed) from GitHub: `git pull`.\r\n\r\n### Delete the Vulnerable Login File\r\n\r\nThis is only relevant if you updated WordPress Core to a new version. Any time you update WP Core, it restores default files that re-open certain vulnerabilities.\r\n\r\n1. In your terminal with your SSH connection, run `cd /var/www/jerrywestonmize`\r\n2. Run `rm wp-login.php`. This removes the default login file from your site. This file is common to all Wordpress sites and attacks against this file are very common. Your site's login file is `jwmsecure.php`, which you can see if you run the following command: `ls -lah`.\r\n\r\n### Correct File Permissions\r\n\r\nYou need to ensure that the web service (apache2) is able to properly access and serve the code files for your site. Apache2 runs as a user called `www-data`, so we can grant that user access to all of the files in the project.\r\n\r\n1. In the same SSH connection, run: `cd /var/www/jerrywestonmize`\r\n2. Run `chown -R www-data:www-data /var/www/jerrywestonmize/`. This says recursively give ownership of this project folder to the `www-data` user and the `www-data` group.\r\n\r\n### Restart the Web Service\r\n\r\nI generally like to restart the Apache2 web server service after making these updates.\r\n\r\n1. To do this, enter `sudo systemctl restart apache2`\r\n2. Then you can verify it is up and running by entering `systemctl status apache2`, and of course you should also open your site in a browser at [https://jerrywestonmize.com](https://jerrywestonmize.com) and make sure everything is still running smoothly. You should also ensure you can still log in.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustinjhunt%2Fjerrywestonmize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faustinjhunt%2Fjerrywestonmize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustinjhunt%2Fjerrywestonmize/lists"}