Hi Everyone,
I am new to Kirby CMS but taking over an existing website for some debugging and minor changes.
The website is already online from a previous dev and working on some extent but suffers a few issues (designs and functionalities) and the custom template it is using seems to need a bit of maintenance.
Now I am here to know about the best practices for me to copy this existing codebase on my local system, run it there and do my changes, then upload everything onto the production server back again.
I am using Windows and WSL2 with Visual Studio to run a server etc.
What would be the best way to go with that ? Is there maybe a reference thread in the forum that I missed already ? Do I need to pay attention to any license key when running it in local to make some changes ?
For what I’ve done for now is download the whole website folder via FTP, migrate and change ownership to my linux user, install composer dependencies and run the website via a php server but all I get is an error message when connecting to my localhost address.
Would it be maybe better to install a test kirby version and upload simply the template files from the production website in it or something similar ?
Let me know what you think is best.
Kirby sounds awesome and I really want to get to know a bit better this CMS and how it works to eventually use it on new projects. Thanks in advance for your insights and help here.
What you already did is fine, but check the following (not familiar with Windows and WSL)
- how did you spin up the local server or what type of php server are you using? If you are using the built-in PHP server, you need to make sure that you include the router file: Quickstart | Kirby CMS
- For Apache, you need the default .htaccess file, make sure it is present in what you downloaded (hidden file)
- If you don’t use Apache, you need to configure it properly
- Also make sure there is no
url
set in site/config/config.php
Hi texnixe,
Thanks for your quick reply.
So WSL is basically a Ubuntu distribution running virtually on windows. So it is a linux system I am using.
-
how did you spin up the local server or what type of php server are you using? If you are using the built-in PHP server, you need to make sure that you include the router file: Quickstart | Kirby CMS
I am running an apache server on linux with apache2 and php8.1
-
For Apache, you need the default .htaccess file, make sure it is present in what you downloaded (hidden file).
I have it in the folder
-
Also make sure there is no url
set in site/config/config.php
No url is set in config.php
When I access the website via the apache server i get the following message :
This page is currently offline due to an unexpected error. We are very sorry for the inconvenience and will fix it as soon as possible.
Advice for developers and administrators:
Enable debug mode to get further information about the error.
I enabled debug mode by adding the config.php file with the
<?php
return [
'debug' => true
];
But still the message remains the same.
Any ideas how to go further on this ?
Ok so it seems I was missing some templating files, my download via the FTP was incomplete and now it is working :).
However I have a new problem: i can access the main page localhost/main/
but cannot access another relative link localhost/main/section
I’m guessing it has to do with Rewritebase rules or something in the .htaccess but I cannot figure out what exactly. If you have any idea let me know.
I didn’t activate AllowOverride in my Apache config. Now its all working. Thank you for the help !