I'm testing creating new themes in Drupal 8 and I'd like to know the very minimum it takes to create one that can be enabled. I'm not worried about any actual styling yet.

I've created a theme folder in themes called uktheme and I currently have a uktheme.info.yml file in that folder.

the contents of that file are

name: UK Theme
type: theme
description: 'Test theme'
package: Core

  header: Header
  primary_menu: 'Primary Menu'
  feature: 'Feature'
  content: 'Content'
  page_bottom: 'Page Bottom'
  footer_first: 'Footer first'
  footer_second: 'Footer second'
  footer_third: 'Footer third'

However I receive

The website encountered an unexpected error. Please try again later.

when attempting to go into the appearance settings. I do not believe it's my folder structure and location because I successfully created another theme copying the content of Bartik.

2 Answers 2


Perhaps you've missed core.
Required params in *.info.yml are:

Also you can check your *.info.yml for using tabs instead of spaces:

Tabs are NOT allowed, use spaces ONLY.
You MUST indent your properties and lists with 1 or more spaces.

See more in official docs: https://www.drupal.org/theme-guide/8/defining-a-theme


There is a space in your name, that should be wrapped in quotes: name: 'UK Theme'. That space could be causing an error as it produces invalid code.

And also I am pretty sure your theme does not ship with core ;)

  • Hmm, it seems spaces are allowed in YAML (I always thought it was more JSON like). This probably does not solve the issue... Commented Apr 12, 2016 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.