Title: Update a local environment to load application code
Author: WordPress VIP Documentation
Published: August 17, 2022
Last modified: December 31, 2025

---

 1. [VIP Local Development Environment](https://docs.wpvip.com/vip-local-development-environment/)
 2. Update a local environment to load application code

#  Update a local environment to load application code

The [VIP Local Development Environment](https://docs.wpvip.com/vip-local-development-environment/)
is designed specifically for code development and testing for a VIP Platform application.
A VIP Local Development Environment can be configured to run with a local `git` 
clone of an application’s [wpcomvip GitHub repository](https://docs.wpvip.com/wpcomvip-github-repository/).
A local environment running with application code will respond to updates made to
the local code without restarting, including code changes resulting from branch 
switching initiated by a `git` command.

Branch switching and pushing code updates to an application’s GitHub repository 
must be managed by `[git](https://git-scm.com/)` or a [`git` GUI client](https://git-scm.com/downloads/guis).

**Prerequisites**

On the user’s local machine:

 * A VIP Local Development Environment has been [successfully created and is running](https://docs.wpvip.com/local-development/use-the-vip-local-development-environment/).
 * `[git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)` is installed.

## Clone an application’s GitHub repository

To be accessible by a VIP Local Development Environment, a clone of [an application’s GitHub repository](https://docs.wpvip.com/wpcomvip-github-repository/)
must exist locally.

 1. Obtain the URL for the application’s wpcomvip GitHub repository (e.g., `https://
    github.com/wpcomvip/example-repo`). This can be found in [the dashboard panel](https://docs.wpvip.com/vip-dashboard/dashboard/)
    of the application’s [VIP Dashboard](https://docs.wpvip.com/vip-dashboard/).
 2. Navigate to the application’s wpcomvip GitHub repository URL in a web browser.
 3. Follow GitHub’s instructions for [cloning a repository to a local machine](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository).
    
    For most users, this step can be completed with a `git` command.

In this `git clone` command example, a repository found at the URL `https://github.
com/wpcomvip/example-repo` is cloned to a local machine:

    ```wp-block-preformatted
    git clone git@github.com:wpcomvip/example-repo.git
    ```

The repository does not need to be cloned to a specific location on the local machine.

## Update the `--app-code` option

The next steps assume that a user has [created a VIP Local Development Environment](https://docs.wpvip.com/vip-local-development-environment/create/)
with an assigned `--slug` value `example-site`, and has cloned an application’s 
wpcomvip GitHub repository code to their local machine.

 1. Identify the absolute local path for the `git`-cloned application repository directory.
    For example, a repository that has been cloned locally to a macOS Desktop will 
    have a path that looks similar to:
    `/Users/example-user/Desktop/example-repo`
 2. Use the `vip dev-env update` command to update the `--app-code` option for the 
    local environment to with the path to the local repository directory. 
    In this 
    command example, the `--app-code` option is updated with the absolute path example
    from Step 1: `vip dev-env update --app-code=/Users/example-user/Desktop/example-
    repo --slug=example-site`
 3. Restart the environment:

    ```wp-block-preformatted
    vip dev-env start --slug=example-site
    ```

 5. Confirm that the environment is up and running by copying the first listed `NGINX
    URLS` value and loading it in a browser window: `http://example-site.vipdev.lndo.
    site/`

A successfully running environment will have a [core WordPress theme](https://wordpress.org/themes/author/wordpressdotorg/)
enabled and display a default “Hello World!” post on the home page.

 6. Access the WordPress login portal for the running environment by copying the `LOGIN
    URL` value and loading it in a browser window: `http://example-site.vipdev.lndo.
    site/wp-admin/ `
 7. Retrieve [the default login credentials for a VIP Local Development Environment](https://docs.wpvip.com/vip-local-development-environment/basic-usage/#h-default-wordpress-login-credentials)
    with the `info` command:

    ```wp-block-preformatted
    vip dev-env info --slug=example-site
    ```

 8.  Access the WordPress Admin dashboard of the running environment by entering the
     default login credentials then select the button labeled “**Log in**“.
 9.  Navigate to the [Plugins screen](https://wordpress.org/support/article/plugins-screen/).
     If the local environment is running with the locally cloned code, plugins from
     that repository will be listed in the Plugins screen.

## Theme and plugin directories on the local environment

On a local environment that has been successfully configured to run application 
code from a `git`-cloned repository:

 * The path `/wp-content/themes/` is mapped to the [`/themes`](https://docs.wpvip.com/wordpress-skeleton/themes-directory/)
   [ directory](https://docs.wpvip.com/wordpress-skeleton/themes-directory/) in 
   the root of the cloned repository. For new themes to load on the local environment,
   they must be added to the `/themes` directory of the cloned repository.
   **For
   local environments that are created as a multisite:** Themes will not be listed
   in a network site’s [Themes screen](https://wordpress.org/support/article/appearance-themes-screen/)
   until they are [network enabled or enabled per site](https://codex.wordpress.org/Network_Admin_Themes_Screen).
 * The path `/wp-content/plugins/` is mapped to the [`/plugins` directory](https://docs.wpvip.com/wordpress-skeleton/plugins-directory/)
   in the root of the cloned repository. For new plugins to load on the local environment,
   they must be added to the `/plugins` directory of the cloned repository.
 * The path `/wp-content/mu-plugins/` is mapped to the [`/client-mu-plugins` directory](https://docs.wpvip.com/wordpress-skeleton/client-mu-plugins-directory/)
   in the root of the cloned repository. For a plugin to load on the local environment
   as a [Must Use (MU) plugin](https://wordpress.org/documentation/article/must-use-plugins/),
   the plugin must be added to the `/client-mu-plugins` directory of the cloned 
   repository, and [loaded programmatically](https://docs.wpvip.com/activate-plugins-through-code/)
   with a [`plugin-loader.php`](https://github.com/Automattic/vip-go-skeleton/blob/master/client-mu-plugins/plugin-loader.php)
   file.

---

After a local environment is successfully running with a local clone of application
code, a [database backup](https://docs.wpvip.com/vip-dashboard/backups/) from a 
VIP Platform environment can be [synced or imported to the local environment](https://docs.wpvip.com/dev-env-add-content/).

Last updated: December 31, 2025