Tasks.php
public function fructifyInstall(string $versionContraint = '*')
    {
        // Lets check if wordpress actually exists
        if (!file_exists('./wp-includes/version.php'))
        {
            // Grab the resolved version number
            $version = $this->wpResolveVersionNo($versionContraint);

            // Download the core wordpress files
            $this->_exec('./vendor/bin/wp core download --version='.$version);

            // Remove a few things we don't need
            @unlink('./license.txt');
            @unlink('./readme.html');
            @unlink('./wp-config-sample.php');
            @unlink('./wp-content/plugins/hello.php');

            // Read in the composer file and remove some of the bundled plugins
            // and themes unless of course they are actually referenced in the
            // composer requirements.
            $composer = Str::s(file_get_contents('./composer.json'));

            if (!$composer->contains('wpackagist-plugin/akismet'))
            {
                $this->_deleteDir(['./wp-content/plugins/akismet']);
            }

            if (!$composer->contains('wpackagist-theme/twentyseventeen'))
            {
                $this->_deleteDir(['./wp-content/themes/twentyseventeen']);
            }

            if (!$composer->contains('wpackagist-theme/twentysixteen'))
            {
                $this->_deleteDir(['./wp-content/themes/twentysixteen']);
            }

            if (!$composer->contains('wpackagist-theme/twentyfifteen'))
            {
                $this->_deleteDir(['./wp-content/themes/twentyfifteen']);
            }

            if (!$composer->contains('wpackagist-theme/twentyfourteen'))
            {
                $this->_deleteDir(['./wp-content/themes/twentyfourteen']);
            }
        }
    }
public function fructifyInstall(string $versionContraint = '*')
    {
        // Lets check if wordpress actually exists
        if (!file_exists('./wp-includes/version.php'))
        {
            // Grab the resolved version number
            $version = $this->wpResolveVersionNo($versionContraint);

            // Download the core wordpress files
            $this->_exec('./vendor/bin/wp core download --version='.$version);

            // Remove a few things we don't need
            @unlink('./license.txt');
            @unlink('./readme.html');
            @unlink('./wp-config-sample.php');
            @unlink('./wp-content/plugins/hello.php');

            // Read in the composer file and remove some of the bundled plugins
            // and themes unless of course they are actually referenced in the
            // composer requirements.
            $composer = Str::s(file_get_contents('./composer.json'));

            if (!$composer->contains('wpackagist-plugin/akismet'))
            {
                $this->_deleteDir(['./wp-content/plugins/akismet']);
            }

            if (!$composer->contains('wpackagist-theme/twentyseventeen'))
            {
                $this->_deleteDir(['./wp-content/themes/twentyseventeen']);
            }

            if (!$composer->contains('wpackagist-theme/twentysixteen'))
            {
                $this->_deleteDir(['./wp-content/themes/twentysixteen']);
            }

            if (!$composer->contains('wpackagist-theme/twentyfifteen'))
            {
                $this->_deleteDir(['./wp-content/themes/twentyfifteen']);
            }

            if (!$composer->contains('wpackagist-theme/twentyfourteen'))
            {
                $this->_deleteDir(['./wp-content/themes/twentyfourteen']);
            }
        }
    }
public function fructifyInstall ( string $ versionContraint = '*' ) { // Lets check if wordpress actually exists if ( ! file_exists ( './wp-includes/version.php' ) ) { // Grab the resolved version number $ version = $ this -> wpResolveVersionNo ( $ versionContraint ) ; // Download the core wordpress files $ this -> _exec ( './vendor/bin/wp core download --version=' . $ version ) ; // Remove a few things we don't need @ unlink ( './license.txt' ) ; @ unlink ( './readme.html' ) ; @ unlink ( './wp-config-sample.php' ) ; @ unlink ( './wp-content/plugins/hello.php' ) ; // Read in the composer file and remove some of the bundled plugins // and themes unless of course they are actually referenced in the // composer requirements. $ composer = Str :: s ( file_get_contents ( './composer.json' ) ) ; if ( ! $ composer -> contains ( 'wpackagist-plugin/akismet' ) ) { $ this -> _deleteDir ( [ './wp-content/plugins/akismet' ] ) ; } if ( ! $ composer -> contains ( 'wpackagist-theme/twentyseventeen' ) ) { $ this -> _deleteDir ( [ './wp-content/themes/twentyseventeen' ] ) ; } if ( ! $ composer -> contains ( 'wpackagist-theme/twentysixteen' ) ) { $ this -> _deleteDir ( [ './wp-content/themes/twentysixteen' ] ) ; } if ( ! $ composer -> contains ( 'wpackagist-theme/twentyfifteen' ) ) { $ this -> _deleteDir ( [ './wp-content/themes/twentyfifteen' ] ) ; } if ( ! $ composer -> contains ( 'wpackagist-theme/twentyfourteen' ) ) { $ this -> _deleteDir ( [ './wp-content/themes/twentyfourteen' ] ) ; } } }
Installs Wordpress.

This task will download the core wordpress files for you. It is
automatically run by composer as a post-install-cmd so you really
shouldn't need to worry about it.

But if you do want to call it, usage would look like:

```
./robo fructify:install v4.*
```

@param  string $versionContraint A semantic version contraint.
@return void
Installs Wordpress .