Skip to content

Conversation

@adamziel
Copy link
Collaborator

@adamziel adamziel commented Sep 2, 2025

WIP

An attempt to run the WordPress installer without WP-CLI to avoid downloading a few megabytes of wp-cli.phar in WordPress Playground.

@adamziel adamziel added the enhancement New feature or request label Sep 2, 2025
@vadimkantorov
Copy link

vadimkantorov commented Nov 5, 2025

And even https://github.com/WordPress/sqlite-database-integration/blob/2049cf0a21fd0fa6a70e0d67678ee26eded20c57/.github/workflows/mysql-proxy-tests.yml has to use third-party GH Actions repos even to set up php and composer

It would be great to have a complete example of installing composer+WP, currently I had to use sth like this:

https://github.com/vadimkantorov/wpssg/blob/3db3c8c4a5929d88d9a9b570b10567e4a357825b/.github/workflows/publish.yml#L34-L60 :

      - name: Prerequisites
        run: |
          sudo apt install php-cli php-mysql php-dom mysql-server sqlite3 jq
          curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

      - name: Setup WordPress
        run: |
          sudo service mysql start
          sudo mysql -h 127.0.0.1 --user=root --password=root <<< "CREATE USER 'wpssguser'@'127.0.0.1' IDENTIFIED WITH mysql_native_password BY 'wpssgpass'; CREATE DATABASE wpssgdb; GRANT ALL PRIVILEGES ON wpssgdb.* TO 'wpssguser'@'127.0.0.1';"
          sudo mysql -h 127.0.0.1 --user=wpssguser --password=wpssgpass <<< "SHOW DATABASES"

          php ./wp-cli.phar core download --locale=en_US      #--skip-content --force
          php ./wp-cli.phar config create --locale=en_US --dbuser=wpssguser --dbpass=wpssgpass --dbname=wpssgdb --dbhost=127.0.0.1
          #php ./wp-cli.phar db create # https://github.com/orgs/wp-cli/discussions/6003
          php ./wp-cli.phar core install --url=localhost:8080 --title=wpcli --admin_user=wpcli --admin_password=wpcli --admin_email=info@wp-cli.org
          php ./wp-cli.phar option set permalink_structure '/%year%-%monthnum%-%day%-%postname%/'
          
          php ./wp-cli.phar theme install --activate https://knd.te-st.ru/kandinsky.zip

      - name: Setup postmark
        run: |
          git clone https://github.com/dirtsimple/postmark
          php ./wp-cli.phar package install ./postmark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants