Tag: WordPress VIP

WordPress VIP – also known as WordPress VIP Go – is a WordPress hosting service from Automattic generally used for high end / enterprise WordPress websites.

  • Fix Uncaught Error: Illegal offset type in vip-debug-bar-panels.php

    Receiving the following error when trying to add a new page in the WordPress admin on a local install of a WordPress VIP site:

    Fix Fatal error: Uncaught Error: Illegal offset type in isset or empty in mu-plugins/vip-helpers/vip-debug-bar-panels.php on line 384

    Fixed (locally) by modifying the function to return early:

    public function log_http_requests( $args, $url ) {
    	return $args;
    	/* ... */
    }
    
  • Download WordPress VIP database to local install

    First, download what you need via VaultPress and then merge the files with the following command in the terminal. (It helps to name filename.sql to the database name you are going to import to).

    cd Downloads/unzipped-folder/sql
    cat *.sql > filename.sql

    If you don’t want to overwrite the current database, comment out the previous one and create a new one in wp-config.php:

    # define( 'DB_NAME', 'databasename' );
    # define( 'DB_NAME', 'databasename_preprod' );
    define( 'DB_NAME', 'databasename_2023-03-19' );

    Place the file you downloaded in the WordPress root folder (where wp-config.php is, i.e. ‘above’ the wp-content folder etc.).

    (If you are using Local for your local site environment, you may need to access the terminal via the menu option in there, rather than the regular Terminal app, for the following commands to work).

    If you want to overwrite an existing database you will need to drop it first. With wp-cli installed, run the following command from the WordPress root folder:

    wp db drop

    Then:

    wp db create
    wp db import
    wp search-replace livesite.com localsite.test

    Or for preprod sites:

    wp search-replace www-preprod-url-vip.net localsite.test

  • PHP_CodeSniffer for WordPress VIP Go

    phpcs –standard=WordPress-VIP-Go -sp –basepath=. –ignore=vendor path/to/your/code

    Source: Install PHP_CodeSniffer for WordPress VIP · WordPress VIP Documentation