Own theme not showing up in Admin GUI/Themes


I’m trying to create a new, so far private theme and it seems to work more or less.
But it doesn’t show up in the Admin GUI.
I copied all the files (.gitignore, blueprints.yaml (no homepage, demo, bugs links yet), CHANGELOG.md, languages.yaml, LICENSE, photographer.php (renamed), photographer.yaml (renamed), README.md, screenshot.jpg, thumbnail.jpg) from the root of the Photographer theme to my theme and adapted the contents and the images. I entered my theme in /user/config/system.yaml under theme. Still, no sign of it in the Admin GUI. But I noticed sometimes a mixup with Photographer. So I temporarely, as I thought, switched over to Photographer, but then couldn’t go back via the Admin GUI.
So I deleted the Photographer and Quark themes from the installation, corrected the /user/config/system.yaml and my site works again with my theme. In the Admin GUI under Themes I now only get “The connection to the GPM cannot be established”.

What is my theme missing that it won’t show up there?
In case you ask: No, it is not meant to be published and it is anyway by far not ripe for that.
I think I should be able to work with strictly local themes in the GUI, but how?


@bigboy, Would you mind sharing why you want to copy theme Photographer and what you mean with ‘private’?

Anyway, you can easily create an inherited theme, a copy and a new theme using the ‘devtools’ plugin using the following commands:

$ bin/gpm install devtools
$ bin/plugin devtools newtheme

If all you want is making some changes to theme Photographer, you could make an inherited theme based on Photographer. The easiest way to create an inherited theme is to let Grav do the work using the ‘devtools’ plugin. See Inheriting using the CLI.

If you do want to make a copy, you can use the $ bin/plugins devtools newtheme command, and choose ‘copy’ when asked.

And if you want to create a new theme with basic functionality, you could create one using the same $ bin/plugins devtools newtheme command, but choose ‘pure blank’.

@pamtbaau Thank you for your tips.
I want to create a new theme “from scratch” and only took Photographer as an example from which I could start.
Is there a way to do what you suggested on Windows via the Admin GUI, FTP and an editor? So far I’ve never worked with the CLI.
My theme is all there already and the site works (needing some fine-tuning though), only missing some internal mechanics, I suppose, to be considered a theme by Grav.

“private” means locally installed and not meant for publishing.


The devtools plugin only works from the command prompt. Not from Admin.

Is there a way to do what you suggested on Windows via the Admin GUI, FTP and an editor?

I am a bit confused, do I understand correctly that you do not have a local machine with Apache?

For development on a local machine (localhost), I can recommend using Windows Subsystem for Linux. There is a section in the docs that describes the installation of WSL and Apache webserver.

Private vs Public:
All themes you create are ‘private’. Even when publishing on GitHub it can be marked as private.

It only becomes public on Github when you make your repo ‘public’. As soon as your repo is ‘public’ others can download (copy or clone) and install it manually.

For a theme to become downloadable/installable by Grav (cli or Admin), you will need to ask the Grav team to make the theme available in the list of themes.

Even if I disappoint you, but so far I happily work on my Windows machine with an editor and via FTP on my shared hosting with Apache. No local XAMPP. For me it would be nice if I could keep it that way and not install whatever Linux.
So for me the question now is how I could do my way what the devtool does?
If there really is no way I would try to do it via the shell access I have on the shared hosting.

Private vs Public
Thanks for the explanation.
Question: Does that mean that a theme in Grav only works if it is published on Github, ‘private’ or ‘public’?


Even if I disappoint you

No disappointment here, you should work the way you see fit. :slight_smile:

Using WSL is really comfortable though…
No separate Linux installation with dual boots, virtual machines or whatever. It is (near) seamlessly integrated into Windows 10 itself and is installable via the Windows Store. You can explore WSL files using Windows Explorer, edit files with any editor (vscode) and access windows files from WSL.
You do have to install Apache though, which is explained by the step-by-step docs.

Unfortunately, I know no other way then to use a command prompt to run the devtools plugin. If you have access to the shell on you host, you should be fine.

Are you familiar with the preinstalled OpenSSH client which comes with Windows 10? If not, here is a howto.

Private vs Public:
No, you don’t need to publish you theme (or plugin) to Github.
Only if you want to make your theme available to the community, it must be available in a public repo on Github.

OK, understood.
I installed the devtools via the Admin GUI.
On my Windows 10 (v1909) ssh was already there and I installed the Windows Terminal. Then logged in via ssh at my shared hosting with the Grav installation.
After struggling with the permissions for the bin folder and its files - voilà -
bin/plugin devtools newtheme worked.
Thank you.

1 Like