PHPackages                             davisshaver/railyard - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. davisshaver/railyard

ActiveProject

davisshaver/railyard
====================

Starter kit for a Philly Publishing site.

1.01(8y ago)01PHP

Since Dec 27Pushed 8y agoCompare

[ Source](https://github.com/davisshaver/railyard)[ Packagist](https://packagist.org/packages/davisshaver/railyard)[ RSS](/packages/davisshaver-railyard/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (17)Versions (3)Used By (0)

Railyard
========

[](#railyard)

This 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.

Local development
-----------------

[](#local-development)

### Prerequisites

[](#prerequisites)

These tools should be installed on your local system before you begin.

- Composer
- PHP

### Local dev workflow

[](#local-dev-workflow)

New sites are ready to go from the project root. See `.env.sample` for keys supported in `.env`.

You can use Lando, Local by Flywheel, or another local dev solution.

You 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"`.

**Tip:** We ignore the file `notes.md` in the repository if you would like to stash commands here for use in the future.

Existing site import
--------------------

[](#existing-site-import)

Here are some tips for cleaning up existing sites.

1. Install the Revisions command for WP CLI and then delete. [See docs for more options.](https://github.com/trepmal/wp-revisions-cli).

```
wp package install trepmal/wp-revisions-cli
wp revisions clean --hard
wp db optimize

```

2. Delete transients.

```
wp transient delete --all

```

3. Delete pending comments and pingbacks.

In lieu of a WP CLI command, Sequel Pro can be used to delete pingbacks/trackbacks manually.

4. Profile largest tables.

```
wp db size --tables

```

For your prefix (usually `wp_`), we need to keep the following tables:

- `wp_commentmeta`
- `wp_comments`
- `wp_links`
- `wp_options`
- `wp_postmeta`
- `wp_posts`
- `wp_term_relationships`
- `wp_term_taxonomy`
- `wp_termmeta`
- `wp_terms`
- `wp_usermeta`
- `wp_users`

Keep an eye out for extra tables, you may be able to delete them.

5. Transferring files to S3.

Before you begin, you'll need the following:

- S3 Bucket
- IAM user key/secret w/ S3 full permissions on bucket
- [AWS CLI](https://github.com/aws/aws-cli) on server

On third-party servers we want to be extremely cautious of leaving the environment undisturbed.

You can short-circuit the profile configured to AWS by exporting your own key/secret to the environment:

```
export AWS_ACCESS_KEY_ID="REDACTED"
export AWS_SECRET_ACCESS_KEY="REDACTED"
export AWS_DEFAULT_REGION="us-east-1"

```

Now if you run `aws s3 ls` you should see the S3 bucket listed.

Assuming a standard WordPress installation, running this command from the app root will begin a sync process to your bucket:

```
aws s3 sync ./wp-content/uploads/ s3://onwardstate-uploads/uploads/

```

Now we can unset our environment variables. It's like we were never even here!

```
unset AWS_ACCESS_KEY_ID
unset AWS_SECRET_ACCESS_KEY
unset AWS_DEFAULT_REGION

```

If 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.

For local development, S3 Uploads [suggests the following](https://github.com/humanmade/S3-Uploads#offline-development):

> 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.

> 1. Just disable the S3 Uploads plugin in your development environment.
> 2. Define the S3\_UPLOADS\_USE\_LOCAL constant with the plugin active.

> 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/.

At this point, you may still have an unnecessarily large uploads folder. Here are some strategies for reducing the size.

Using [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`.

```
s3utils 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))'

```

However this function would need to be run repeatedly for the images to be cleared.

You 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 &amp; run as follows:

```
wp --url=onwardstate.com assign-featured-images --dry-run --only-missing
wp --url=onwardstate.com assign-featured-images --only-missing

```

6. Removing subscribers.

We can use WP CLI to lookup subscribers and delete subscribers without posts.

```
wp 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

```

The `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.

### Theme

[](#theme)

Terminal is the required theme for Philly Publishing publishers.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 84.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3058d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/599d7678a2ae568980365f733917d796443920f39fab95dc8a590618ddf6fe8f?d=identicon)[davisshaver](/maintainers/davisshaver)

---

Top Contributors

[![davisshaver](https://avatars.githubusercontent.com/u/1636964?v=4)](https://github.com/davisshaver "davisshaver (133 commits)")[![ataylorme](https://avatars.githubusercontent.com/u/2133004?v=4)](https://github.com/ataylorme "ataylorme (11 commits)")[![stevector](https://avatars.githubusercontent.com/u/211029?v=4)](https://github.com/stevector "stevector (11 commits)")[![greg-1-anderson](https://avatars.githubusercontent.com/u/612191?v=4)](https://github.com/greg-1-anderson "greg-1-anderson (3 commits)")

---

Tags

circlecigithub-apilandopantheonwordpresswordpress-development

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/davisshaver-railyard/health.svg)

```
[![Health](https://phpackages.com/badges/davisshaver-railyard/health.svg)](https://phpackages.com/packages/davisshaver-railyard)
```

###  Alternatives

[roots/bedrock

WordPress boilerplate with Composer, easier configuration, and an improved folder structure

6.5k441.8k2](/packages/roots-bedrock)[vinkla/wordplate

The WordPlate boilerplate

2.2k5.1k](/packages/vinkla-wordplate)[pantheon-systems/example-wordpress-composer

994.2k](/packages/pantheon-systems-example-wordpress-composer)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
