Urm, how do I get started?

OK a complete newbie. I’ve downloaded the Plainkit. I’ve then dragged the downloaded folder into the Terminal (I have no idea what Terminal is) and copy and pasted “php -S localhost:8000 kirby/router.php” and pressed return. I’ve then gone to my browser and typed in http://localhost:8000. The web page displays the following

Warning : Unknown: failed to open stream: No such file or directory in Unknown on line 0

Fatal error : Unknown: Failed opening required ‘kirby/router.php’ (include_path=’.:’) in Unknown on line 0

Is that suppose to happen?

So then I have used Fetch FTP app to upload the downloaded file to a sub-folder on my server. www.xyz.co.uk/test But when I visit this address in my browser it just says:

This page is currently offline. We are very sorry for the inconvenience and will fix it as soon as possible.

Advice for developers and administrators:
Change the PHP version to 7.3, 7.4 or 8.0 (PHP 7.4 is recommended)

So I’m at a lose to know how to instal or get started with Kirby.

This error message means that the server you uploaded the folder to does not have PHP 7.3+ enabled. Usually, you can change the PHP version on the server by going to the Dashboard and change the version. What is your hosting service?

As regards your first try:

Are you on a Mac? Have you made sure you were really in the downloaded folder in your Terminal (a terminal is a basically a computer program that lets you execute commands on your computer).

So it looked similar to this:

First attempt on my Mac. I’ve taken a screenshot of what I see in Terminal.
Screenshot 2021-08-20 at 4.54.57 pm

Presumably the purpose of this is to create a server thingy on my Mac, for me to create my site before uploading my site and making it live?

Second attempt on my web hosting. If I can find the CPanel dashboard how or where do I change the the PHP version? What should I change the version to? Do I have to upload anything?

Many thanks

If you press Ctrl-C to quit that again, and then inside the folder type ls -la what do you get?

I’ve pressed Ctrl-C. Terminal then shows the following:

Screenshot 2021-08-21 at 1.44.44 pm

What or where is "folder type ls -la"? I’ve done a search on my Mac for Is -la but can’t find a folder of that name.

Oh, do you mean type ls -la into the Terminal thingy window and press enter? I’ve done that and Terminal has written this:

Screenshot 2021-08-21 at 1.53.44 pm

I’ve now typed in http://localhost:8000 into Safari and I get the message:

Safari Can’t Connect to the Server
Safari can’t open the page “‎localhost:8000” because Safari can’t connect to the server “localhost”.

Once you stop the server with Ctrl-C, you cannot connect to it anymore, with ls -la I just wanted to see what is in the folder and why it can’t find the router.php file. But the /kirby folder is there and then probably also the router.php inside it. You can find out if that is indeed the case by typing

ls -la kirby

This will output the content of the /kirby folder.

Or you go to that folder in your Finder and check what’s inside it.

If you are not happy with using the command line, an app like MAMP might be better suited?

Thanks. I’ve typed in ls -la kirby into the Terminal thingy window. And get the following:

Now what do I do?

Ok, that looks good, the router.php file is there as expected, but I have no idea why you are getting this error message.

Local PHP version looks fine as well.

You seem to be in the right folder…

:thinking:

Urm, what does “command line” mean? I’ve downloaded the free trial of MAMP app (whatever that is) and opened it. Now what do I do? This is the window i get? Does MAMP allow me to set up a local server on my Mac to build my site before transfering it to my web hosting?

Ok, now we are dealing with this in two threads.

  1. Under Dcocument root choose the folder with your downloaded Plainkit
  2. Then click on the Start button in the upper right.

I have then visited http://localhost:8888 which is the default port I think. But I get the following pop-up in Safari which worries me

Screenshot 2021-08-21 at 2.59.29 pm

What is that? And it it okay to press OK?

Going back to the Terminal attempt. I tried a couple of times to do the Terminal approach, but instead of pressing Ctrl-C quit Terminal. A warning popped-up saying something but I didn’t read it. Could Terminal have started something / a local server that is still running and this be coursing a conflict?

Yes, you have to click yes in the dialog and its ok

Closing the terminal window will stop all running processes, so also the server. Unless you have multiple Terminal windows open

I’ve quit MAMP. Gone to my browser and visited http://localhost:8888 and it now says that it can not connect to the server.

… oh it appears I have to have the MAMP app running and have pressed Start for it to work. Is that correct?

If I’m working on more than website at a time, how does MAMP deal with that?

Also, for now, I want the free MAMP app not the Pro version, but in the MAMP app it still only gives me 14 day trial. Also in the MAMP app (not the pro version) how do I get it to work? Where do I choose the folder with the downloaded Plainkit?

You can then point the document root to the parent folder e.g. a folder www or htdocs or whatever inside the desktop folder.

Then you can reach subfolders of this parent folder with http://localhost:8888/name-of-subfolder.

And yes, the MAMP app has to be running and the server be started with the Start button, otherwise it doesn’t work.

In the Pro version you can define local hosts e.g. plainkit.test etc that then point to a particular folder and would then be reachable in the browser under http.//plainkit.test, but that feature is not available in the free version.

There are of course other local dev environment options available, as pointed out in the cookbook recipe I linked to. But for a first test, Mamp free should be enough.

Thank you for your continued help! I realise I am a newbie and numpty!

The MAMP website forces the user to download both MAMP and MAMP Pro. I have deleted MAMP Pro. When I open MAMP it still says something about being on a 14 trial, can I ignore that? How do I get MAMP (as oppose to the Pro version) to work? What do I do? I don’t understand a single word in this window:

Screenshot 2021-08-21 at 3.33.24 pm

It won’t allow me to click in the Document Root window

You should be able to change the doc root in the preferences. You can savely ignore the pro message.

I have changed the name of the “plainkit-main” folder to “clientA”. I have created a folder on my Mac desktop called “Local server” and put the clientA folder inside it. Then in MAMP changed the document root pointing to the “Local server” folder.

I have then visited http://localhost:8888/clientA in my browser and can see the words “Home”.

So this appears to have worked? Or have I done something catastrophically wrong?