EasyEngine / site-type-wp

Adds 'wp' site type to EasyEngine
12 stars 14 forks source link

Add local cache for WordPress core download #114

Open mrrobot47 opened 5 years ago

mrrobot47 commented 5 years ago

Cache wp core download files after the first run. To speed up the process of installation and reduce unnecessary downloads.

When cache is empty: (These should be skipped if user has passed (--version flag while installation)):

  1. For first install run wp core download.
  2. Cache the downloaded WordPress file in EasyEngine cache directory (EE_CACHE_DIR).

On next install:

  1. Copy the cached files to htdocs.
  2. Run wp core verify-checksum --version=$(wp core version) (Need better way to verify integrity of cache files. wp core version can be maniuplated if the files are wrong). On failure purge cache and proceed with cache empty scenario.
  3. Once checksum is verified. Run wp core update to check for update and update to latest version of any.
  4. If WordPress gets updated in the above, cache the updated files.