Daisuke-sama / wordpress-composer-classic

2 stars 2 forks source link

Simple WordPress installation management with Composer #1

Closed szepeviktor closed 3 years ago

szepeviktor commented 3 years ago
{
  "name": "szepeviktor/wordpress",
  "description": "Install WordPress by using Composer packages.",
  "license": "MIT",
  "require": {
    "php": ">=7.0",
    "roots/wordpress": "^4.9",
    "timber/timber": "^1.8",
    "wpackagist-plugin/wp-redis": "^1.1.1"
  },
  "config": {
    "classmap-authoritative": true,
    "preferred-install": {
      "*": "dist"
    }
  },
  "extra": {
    "installer-paths": {
      "public/wp-content/mu-plugins/{$name}/": [
        "type:wordpress-muplugin"
      ],
      "public/wp-content/plugins/{$name}/": [
        "type:wordpress-plugin"
      ],
      "public/wp-content/themes/{$name}/": [
        "type:wordpress-theme"
      ]
    },
    "wordpress-install-dir": "public/core"
  },
  "repositories": [
    {
      "type": "composer",
      "url": "https://wpackagist.org"
    }
  ],
  "scripts": {
    "post-autoload-dump": [
      "rm -rf public/core/wp-content"
    ],
    "post-create-project-cmd": [
      "mkdir -p public/wp-content/themes public/wp-content/plugins public/wp-content/mu-plugins",
      "cp public/core/wp-content/index.php public/wp-content/",
      "cp -a public/core/wp-content/themes public/wp-content/",
      "cp public/core/wp-content/themes/index.php public/wp-content/themes/",
      "cp public/core/wp-content/plugins/index.php public/wp-content/plugins/"
    ],
    "cleanup": "git status --short --ignored | sed -n -e 's#^!! ##p' | xargs -r rm -vrf"
  },
  "scripts-descriptions": {
    "cleanup": "Remove all ignored files."
  }
}

More tools: https://github.com/szepeviktor/debian-server-tools/tree/master/webserver/wp-install

Daisuke-sama commented 3 years ago

This solution doesn't resolve the issue with WPEngine SLA and compliance. Mine does. Plus it is cleaner. Plus it has some FrontEnd setup. IMHO. you can disagree 👍

szepeviktor commented 3 years ago

I've opened this issue before the first commit :)