code: def is_installed(path, user=None):
      '''
      Check if wordpress is installed and setup
  
      path
          path to wordpress install location
  
      user
          user to run the command as
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' wordpress.is_installed /var/www/html apache
      '''
      retcode = __salt__['cmd.retcode']((
          'wp --path={0} core is-installed'
      ).format(path), runas=user)
      if retcode == 0:
          return True
      return Falsf is_installed(path, user=None):
      '''
      Check if wordpress is installed and setup
  
      path
          path to wordpress install location
  
      user
          user to run the command as
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' wordpress.is_installed /var/www/html apache
      '''
      retcode = __salt__['cmd.retcode']((
          'wp --path={0} core is-installed'
      ).format(path), runas=user)
      if retcode == 0:
          return True
      return False
docs: Check if wordpress is installed and setup
  
      path
          path to wordpress install location
  
      user
          user to run the command as
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' wordpress.is_installed /var/www/html apache