Skip to content

Updating Hyde

While Hyde is in beta, stuff can change rapidly.

This guide will help you update Hyde to the latest version. It is recommended to back up your source files before updating.

Updating Hyde/Framework

Run the following command from your Hyde/Hyde installation:

1composer update hyde/framework

Next, follow the post-update instructions for Hyde/Hyde.

Updating Hyde/Hyde

When updating an existing installation, first ensure you have a Git backup of your source files to revert the update.

Depending on how you installed Hyde, there are a few different ways to update it.

Using Git

Make sure you have a remote set up for the repository.

1git remote add upstream

Then pull the latest changes from the remote:

1git pull upstream master

After this, you should update your composer dependencies:

1composer update

Next, follow the post-update instructions for Hyde/Hyde.

Manual Update

Since all resource files are in the content directories you can simply copy those files to the new location.

If you have changed any other files, for example in the App directory, you will need to update those files manually as well. But if you have done that you probably know what you are doing. I hope. The same goes if you have created any custom blade components or have modified Hyde ones.

Example CLI workflow, assuming the Hyde/Hyde project is stored as my-project in the home directory:

1cd ~
2mv my-project my-project-old
3composer create-project hyde/hyde my-project
5cp -r my-old-project/_pages my-project/content/_pages
6cp -r my-old-project/_posts my-project/content/_posts
7cp -r my-old-project/_media my-project/content/_media
8cp -r my-old-project/_docs my-project/content/_docs
9cp -r my-old-project/config my-project/config

Next, follow the post-update instructions for Hyde/Hyde. After verifying that everything is working, you can delete the old project directory.

Post-update instructions

After updating Hyde you should update your config and resource files. This is where things can get a tiny bit dangerous as the files will be overwritten. However, since you should be using Git, you can take care of any merge conflicts that arise.

1php hyde update:configs
2php hyde update:assets

If you have published any of the Hyde Blade components you will need to re-publish them.

1php hyde publish:views layouts
2php hyde publish:views components

Next, re-build your site.

1php hyde build

And recompile your assets if applicable.

1npm install
2npm run dev/prod