src/Php/Composer/Wordpress.php
public static function installRequiredFiles()
    {
        $htaccess = __DIR__ . '/../../../../../../.htaccess';
        $robots = __DIR__ . '/../../../../../../robots.txt';
        $wpConfig = __DIR__ . '/../../../../../../wp-config-custom';
        $fileSystem = new Filesystem();

        try {
            if (false === $fileSystem->exists($htaccess)) {
                $fileSystem->copy($htaccess . '.dist', $htaccess);
            }
            if (false === $fileSystem->exists($robots)) {
                $fileSystem->copy($robots . '.dist', $robots);
            }
            if (false === $fileSystem->exists($wpConfig . '.php')) {
                $fileSystem->copy($wpConfig . '-sample.php', $wpConfig . '.php');
            }
        } catch (\Exception $exception) {
            echo sprintf("Something wrong happens during process: \n%s\n", $exception->getMessage());
        }
    }
public static function installRequiredFiles()
    {
        $htaccess = __DIR__ . '/../../../../../../.htaccess';
        $robots = __DIR__ . '/../../../../../../robots.txt';
        $wpConfig = __DIR__ . '/../../../../../../wp-config-custom';
        $fileSystem = new Filesystem();

        try {
            if (false === $fileSystem->exists($htaccess)) {
                $fileSystem->copy($htaccess . '.dist', $htaccess);
            }
            if (false === $fileSystem->exists($robots)) {
                $fileSystem->copy($robots . '.dist', $robots);
            }
            if (false === $fileSystem->exists($wpConfig . '.php')) {
                $fileSystem->copy($wpConfig . '-sample.php', $wpConfig . '.php');
            }
        } catch (\Exception $exception) {
            echo sprintf("Something wrong happens during process: \n%s\n", $exception->getMessage());
        }
    }
public static function installRequiredFiles ( ) { $ htaccess = __DIR__ . '/../../../../../../.htaccess' ; $ robots = __DIR__ . '/../../../../../../robots.txt' ; $ wpConfig = __DIR__ . '/../../../../../../wp-config-custom' ; $ fileSystem = new Filesystem ( ) ; try { if ( false === $ fileSystem -> exists ( $ htaccess ) ) { $ fileSystem -> copy ( $ htaccess . '.dist' , $ htaccess ) ; } if ( false === $ fileSystem -> exists ( $ robots ) ) { $ fileSystem -> copy ( $ robots . '.dist' , $ robots ) ; } if ( false === $ fileSystem -> exists ( $ wpConfig . '.php' ) ) { $ fileSystem -> copy ( $ wpConfig . '-sample.php' , $ wpConfig . '.php' ) ; } } catch ( \ Exception $ exception ) { echo sprintf ( "Something wrong happens during process: \n%s\n" , $ exception -> getMessage ( ) ) ; } }
Static method that creates .htaccess, robots.txt and wp-config-custom.php files if they do not exist.
Static method that creates . htaccess robots . txt and wp - config - custom . php files if they do not exist .