{"id":15292309,"url":"https://github.com/davisshaver/railyard","last_synced_at":"2026-05-16T18:05:00.495Z","repository":{"id":56963608,"uuid":"115535206","full_name":"davisshaver/railyard","owner":"davisshaver","description":"Starter kit for a Philly Publishing site.","archived":false,"fork":false,"pushed_at":"2018-02-18T22:50:55.000Z","size":364,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-30T09:36:59.129Z","etag":null,"topics":["circleci","github-api","lando","pantheon","wordpress","wordpress-development"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davisshaver.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-27T15:43:31.000Z","updated_at":"2018-01-14T09:49:09.000Z","dependencies_parsed_at":"2022-08-21T09:50:53.037Z","dependency_job_id":null,"html_url":"https://github.com/davisshaver/railyard","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/davisshaver/railyard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davisshaver%2Frailyard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davisshaver%2Frailyard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davisshaver%2Frailyard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davisshaver%2Frailyard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davisshaver","download_url":"https://codeload.github.com/davisshaver/railyard/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davisshaver%2Frailyard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272833293,"owners_count":25000870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["circleci","github-api","lando","pantheon","wordpress","wordpress-development"],"created_at":"2024-09-30T16:17:19.460Z","updated_at":"2026-05-16T18:05:00.451Z","avatar_url":"https://github.com/davisshaver.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Railyard\nThis is the starter kit for new Philly Publishing Company sites. It lays out the tracks for local development and new site creation. Proprietary code and secrets can be included on a per site basis using Composer or direct commits.\n\n## Local development\n\n### Prerequisites\nThese tools should be installed on your local system before you begin.\n\n- Composer\n- PHP\n\n### Local dev workflow\n\nNew sites are ready to go from the project root. See `.env.sample` for keys supported in `.env`.\n\nYou can use Lando, Local by Flywheel, or another local dev solution.\n\nYou may want to run `wp db import ./private/local/railyard.sql.gz` next. This populates the database to simulate a typical Philly Publishing site. Doing this with a production database may take some time. If you are using a production database, you may need to reset a password at this point. You can do this with `wp user update admin --user_pass=\"PASSWORD\"`.\n\n**Tip:** We ignore the file `notes.md` in the repository if you would like to stash commands here for use in the future.\n\n## Existing site import\n\nHere are some tips for cleaning up existing sites.\n\n1. Install the Revisions command for WP CLI and then delete. [See docs for more options.](https://github.com/trepmal/wp-revisions-cli).\n\n```\nwp package install trepmal/wp-revisions-cli\nwp revisions clean --hard\nwp db optimize\n```\n\n2. Delete transients.\n\n```\nwp transient delete --all\n```\n\n3. Delete pending comments and pingbacks.\n\nIn lieu of a WP CLI command, Sequel Pro can be used to delete pingbacks/trackbacks manually.\n\n4. Profile largest tables.\n\n```\nwp db size --tables\n```\n\nFor your prefix (usually `wp_`), we need to keep the following tables:\n\n- `wp_commentmeta`\n- `wp_comments`\n- `wp_links`\n- `wp_options`\n- `wp_postmeta`\n- `wp_posts`\n- `wp_term_relationships`\n- `wp_term_taxonomy`\n- `wp_termmeta`\n- `wp_terms`\n- `wp_usermeta`\n- `wp_users`\n\nKeep an eye out for extra tables, you may be able to delete them.\n\n5. Transferring files to S3.\n\nBefore you begin, you'll need the following:\n\n- S3 Bucket\n- IAM user key/secret w/ S3 full permissions on bucket\n- [AWS CLI](https://github.com/aws/aws-cli) on server\n\nOn third-party servers we want to be extremely cautious of leaving the environment undisturbed.\n\nYou can short-circuit the profile configured to AWS by exporting your own key/secret to the environment:\n\n```\nexport AWS_ACCESS_KEY_ID=\"REDACTED\"\nexport AWS_SECRET_ACCESS_KEY=\"REDACTED\"\nexport AWS_DEFAULT_REGION=\"us-east-1\"\n```\n\nNow if you run `aws s3 ls` you should see the S3 bucket listed.\n\nAssuming a standard WordPress installation, running this command from the app root will begin a sync process to your bucket:\n\n```\naws s3 sync ./wp-content/uploads/ s3://onwardstate-uploads/uploads/\n```\n\nNow we can unset our environment variables. It's like we were never even here! \n\n```\nunset AWS_ACCESS_KEY_ID\nunset AWS_SECRET_ACCESS_KEY\nunset AWS_DEFAULT_REGION\n```\n\nIf you have setup and activated S3 Uploads, image files should load at this point. You may also want to sync all or part of S3 bucket to your server for redundancy. \n\nFor local development, S3 Uploads [suggests the following](https://github.com/humanmade/S3-Uploads#offline-development):\n\n\u003e While it's possible to use S3 Uploads for local development (this is actually a nice way to not have to sync all uploads from production to development), if you want to develop offline you have a couple of options.\n\n\u003e 1. Just disable the S3 Uploads plugin in your development environment.\n\u003e 2. Define the S3_UPLOADS_USE_LOCAL constant with the plugin active.\n\n\u003e Option 2 will allow you to run the S3 Uploads plugin for production parity purposes, it will essentially mock Amazon S3 with a local stream wrapper and actually store the uploads in your WP Upload Dir /s3/.\n\nAt this point, you may still have an unnecessarily large uploads folder. Here are some strategies for reducing the size.\n\nUsing [Node S3 Utils](https://www.npmjs.com/package/node-s3-utils), we can list the uploads that have the mark of being auto-generated by WordPress. Specifically containing the last bit of `####x####.jpg`. \n\n```\ns3utils files delete -c ./.s3-credentials.json -p uploads/ -r 'uploads\\/[0-9]{4}\\/[0-9]{1,2}\\/(.*-[0-9]{1,4}x[0-9]{1,4}.(png|gif|jpg))'\n```\n\nHowever this function would need to be run repeatedly for the images to be cleared.\n\nYou may also want to double check that all posts have a featured image. The featured image features was introduced in version 2.9 (December 18th, 2009).  Install [Run Command's Assign Featured Image](https://github.com/runcommand/assign-featured-images) package and then preview \u0026 run as follows:\n\n```\nwp --url=onwardstate.com assign-featured-images --dry-run --only-missing\nwp --url=onwardstate.com assign-featured-images --only-missing\n```\n\n6. Removing subscribers.\n\nWe can use WP CLI to lookup subscribers and delete subscribers without posts.\n\n```\nwp user delete $(wp db query \"SELECT ID FROM os08_users WHERE ID NOT IN ( SELECT DISTINCT post_author FROM os08_posts ) AND ID NOT IN (4)\" --url=onwardstate.com | tail -n +2 ) --url=onwardstate.com --reassign=1\n```\n\nThe `4` here is the admin ID, which can be obtained with somthing like `wp user list --role=administrator --field=ID`. Comma separate multiple administrator ID's to ignore.\n\n### Theme\n\nTerminal is the required theme for Philly Publishing publishers.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavisshaver%2Frailyard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavisshaver%2Frailyard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavisshaver%2Frailyard/lists"}