Wp core download (WP-CLI)

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen
Voorbeeld van gedownloade WordPress-instanties als zip-bestanden

download een actuele WordPress-instantie en plaats die uitgepakt en MD5-geverifiëerd in de werkmap, of in de map die wordt meegegeven. In tegenstelling tot Drupal, werkt dit heel simpel.

wp core download

   [--path=<path>]         Specify the path in which to install WordPress. Defaults to current directory.
   [--locale=<locale>]     Select which language you want to download.
   [--version=<version>]   Select which version you want to download. Accepts a version number, ‘latest’ or ‘nightly’
   [--force]               Overwrites existing files, if present. 

Voorbeeld:

$ cd /var/www/example.com

$ wp core download

Downloading WordPress 5.9.1 (en_US)...
md5 hash verified: 5bbe205b48cf9255fd7c954040aeb125
Success: WordPress downloaded.

$ ls
index.php    wp-activate.php     wp-comments-post.php  wp-cron.php        wp-load.php   wp-settings.php   xmlrpc.php
license.txt  wp-admin            wp-config-sample.php  wp-includes        wp-login.php  wp-signup.php
readme.html  wp-blog-header.php  wp-content            wp-links-opml.php  wp-mail.php   wp-trackback.php

Wat-ie precies doet:

  • De WordPress-instantie wordt gedownload als gezipped phar-archief naar /tmp. Zie afbeelding hiernaast
  • md5-hash van dit archiefbestand wordt geverifiëerd
  • Het archiefbestand wordt uitgepakt naar een tijdelijke locatie

Foutmelding: Couldn't decompress

Het probleem:

wp core download
Downloading WordPress 4.8.2 (en_US)...
md5 hash verified: 2e8744a702a3d9527782d9135a4c9544
Error: Couldn't extract WordPress archive. unable to decompress gzipped phar archive "/tmp/wp_59c276fb45c4b.tar.gz" to temporary file

Aanvullende gegevens:

  • sudo chmod o+w /tmp - Hielp niet
  • sudo /usr/local/bin/wp core download --allow-root - Hielp niet
  • wp cli ge-update - Hielp niet