PHPackages                             xm/starter\_wordpress - 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. xm/starter\_wordpress

ActiveProject

xm/starter\_wordpress
=====================

Starter for creating WordPress sites at XM Media

032[4 issues](https://github.com/xmmedia/starter_wordpress/issues)[3 PRs](https://github.com/xmmedia/starter_wordpress/pulls)PHP

Since Dec 18Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/xmmedia/starter_wordpress)[ Packagist](https://packagist.org/packages/xm/starter_wordpress)[ RSS](/packages/xm-starter-wordpress/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (4)Used By (0)

XM WordPress Starter
====================

[](#xm-wordpress-starter)

- Required: composer, node, yarn
- Optional: wp-cli
- Based on

Initial Setup
-------------

[](#initial-setup)

1. Create a new project: ```
    composer create-project xm/starter_wordpress project-name --stability=dev --no-install --remove-vcs
    ```
2. Copy `.env.example` to `.env`.
3. Update environment variables in the `.env` file:

- Database: define `DATABASE_URL` for using a DSN (e.g. `mysql://user:password@127.0.0.1:3306/db_name`)
- `WP_ENV` - Set to environment (`development`, `staging`, `production`)
- `WP_HOME` - Full URL to WordPress home ()
- `WP_SITEURL` - Full URL to WordPress including subdirectory ()
- `WPCOM_API_KEY` - Wordpress.com API key for Akismet and Jetpack (or other WordPress paid plugins)
- `AUTH_KEY`, `SECURE_AUTH_KEY`, `LOGGED_IN_KEY`, `NONCE_KEY`, `AUTH_SALT`, `SECURE_AUTH_SALT`, `LOGGED_IN_SALT`, `NONCE_SALT` from:
- `ACF_PRO_KEY` - add ACF key

7. Server setup:
    1. If using InterWorx or CentOS, upload `setup_dev.sh` and run: `sh ./setup_dev.sh`
    2. Upload files to the server. Don't upload (most are listed in `.gitignore`):
        - `/.git` and `/.idea`
        - Plus the following (these will only exist if you've installed the JS or PHP packages):
            - `/public/wp`
            - `/public/app/plugins/*`
            - `/vendor`
            - `/bin`
            - `/node_modules`
    3. [Install Composer](https://getcomposer.org/download/) (if not already installed)
    4. Add `.env` (copy `.env.example` and update).
    5. Install PHP packages/vendors: `php composer.phar install`
    6. Run `. ./node_setup.sh` (this will setup node &amp; install the JS packages – requires yarn to be installed).
    7. Run `yarn dev` or `yarn build` (for production) to compile JS &amp; CSS files.
    8. Link public to html: `rm -rf html && ln -s public html`
    9. Create a symlink between vendor and plugin directory for ACF: `ln -s /home//dev.example.com/vendor/advanced-custom-fields/advanced-custom-fields-pro public/app/plugins/acf`
    10. Add cron: `*/15 * * * * curl https://dev.example.com/wp/wp-cron.php` (this is every 15 minutes). The automatic cron is disabled.
    11. Adjust permissions on the bin dir: `chmod u+x bin/*`
    12. Install WP: `bin/wp core install --allow-root --url=https:// --title="" --admin_user= --admin_email=`
8. Update `composer.json`: `name`, `license` (likely `proprietary`) and `description`@todo-wordpress - ACF now needs an auth.json file to work with composer. Get the details from  - HS
9. Update `package.json`: `name`, `version`, `git.url`, `license`, `private`, `script.dev-server`
10. Install PHP packages &amp; update locally: `composer install && composer update`
11. Run `yarn && yarn upgrade` locally.
12. Upload `composer.lock` and `yarn.lock` and on the server, re-run `php composer.phar install` and `. ./node_setup.sh` again.
13. Find and make changes near `@todo-wordpress` comments throughout the site. All changed files will need to uploaded to the server.
14. Access WordPress admin at `https://dev.example.com/wp/wp-admin/`
15. To activate all installed plugins: `bin/wp plugin activate --all`
16. Delete or update `README.md` and `LICENSE`
17. Add the Postmark API key
18. Create new favicons: [realfavicongenerator.net](https://realfavicongenerator.net)
19. Consider the following WordPress settings:
    - Setting the homepage: create the page and then select the home page under Settings &gt; Reading
    - Dev: Settings &gt; Reading "Discourage search engines from indexing this site" (for Dev)

System Requirements
-------------------

[](#system-requirements)

- PHP 8.0+
- MySQL 5.7+
- [Composer](https://getcomposer.org/download/)
- [Yarn](https://yarnpkg.com/en/docs/install)

Adding Plugins/Themes using WPackagist
--------------------------------------

[](#adding-pluginsthemes-using-wpackagist)

For packages that are found on [WPackagist](https://wpackagist.org/) and support Composer install.

1. Run `composer require wpackagist-plugin/plugin-name` or `composer require wpackagist-theme/theme-name`
2. Upload the `composer.json` &amp; `composer.lock` files to the server (if applicable).
3. Run `php composer.phar install` on the server (if applicable).
4. Activate and configure the plugin or theme in WordPress.

Note: for plugins installed this way, only the references to plugin in `composer.json` and `composer.lock` are committed to git. The actual plugin files are not committed to git.

Adding Plugins/Themes *not on* WPackagist
-----------------------------------------

[](#adding-pluginsthemes-not-on-wpackagist)

Download the archive of the plugin and put in the `/public/app/mu-plugins//` dir. Add a line to `.gitignore` such as `!public/app/mu-plugins/plugin/` so the plugin is detected/include by git. Commit the plugin to git. It will need to manually updated.

WordPress only looks for PHP files right inside the mu-plugins directory, and (unlike for normal plugins) not for files in subdirectories. You may need to create a proxy PHP loader file inside the mu-plugins directory (i.e. load.php). Only do this if it is not finding the plugin file on it's own, otherwise you'll get a duplication error.

``

This will use WordPress' internal path and URL generation to deal with the theme folder changing or moving. The slash at the beginning of the path is optional.

changing theme name

Updating WordPress &amp; Plugins/Packages
-----------------------------------------

[](#updating-wordpress--pluginspackages)

To update WordPress core and all the plugins, run the following locally. Replace `5.2.3` with the current version.

`composer update && composer require roots/wordpress:5.2.3`

The latest version of WordPress available can be found here:

Changing the Theme Name/Path
----------------------------

[](#changing-the-theme-namepath)

To change the theme name from the default `default` to, for example, `company`:

1. Rename the theme folder.
2. In `config/application.php`, update the `Config::define('WP_DEFAULT_THEME', 'default');` line.
3. In `webpack.base.config.js`, update all the paths referencing the theme folder, ie, `public/app/themes/default/...`

Commands
--------

[](#commands)

- Production JS/CSS build: `yarn build`
- Dev JS/CSS build: `yarn dev`
- Dev JS/CSS watch: `yarn watch` (files will not be versioned)
- Dev JS/CSS HMR server: `yarn dev-server` (if configured)
- JS Tests ([Jest](https://jestjs.io/)): `yarn test:unit` (if configured)
- Linting:
    - JS ([ESLint](https://eslint.org/)): `yarn lint:js` or `yarn lint:js:fix`
    - CSS: `yarn lint:css` or `yarn lint:css:fix`

Going Live / After Launch
-------------------------

[](#going-live--after-launch)

- Ensure "From" / "To" addresses in Contact Forms are correct
- Remove Test Blog Post and Sample Page or Google will index these.
- Ensure "Discourage search engines from indexing this site" is unchecked under Settings &gt; Reading
- If not using "Posts" turn off Post indexing in Yoast &gt; Search Appearance &gt; Content
- If not using "Posts" turn off Author indexing in Yoast &gt; Search Appearance &gt; Archives - otherwise Google will index a page for each user/author, whether it is being used or not.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance57

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

 Bus Factor1

Top contributor holds 91.8% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ba6b4f635e1306d5f75c48ad0e6464858f8d17e69458fb7850e5c0af8c1de98c?d=identicon)[darrylhein](/maintainers/darrylhein)

---

Top Contributors

[![darrylhein](https://avatars.githubusercontent.com/u/376976?v=4)](https://github.com/darrylhein "darrylhein (426 commits)")[![hsteuernagel](https://avatars.githubusercontent.com/u/9735609?v=4)](https://github.com/hsteuernagel "hsteuernagel (35 commits)")[![meggy236](https://avatars.githubusercontent.com/u/150461169?v=4)](https://github.com/meggy236 "meggy236 (3 commits)")

### Embed Badge

![Health badge](/badges/xm-starter-wordpress/health.svg)

```
[![Health](https://phpackages.com/badges/xm-starter-wordpress/health.svg)](https://phpackages.com/packages/xm-starter-wordpress)
```

PHPackages © 2026

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