I have recently discovered Neos and by trying it out locally I got pretty excited to start building websites with it. Although I might describe myself as a computer person I was not able to get ahold of the concept behind using Neos to not only develop locally on your machine, but to also to use it as a CMS like Wordpress on a hosted server. After a few weeks of trial an error I am now desperate enough to ask the community for help.
I’m not looking for a step-by-step (although that would be nice as well ), but for now it would be nice if someone could explain a practical workflow for creating sites and getting them online via a hosted server.
So I have already tried to install it the same way I did on my laptop, only via ssh. This failed because I don’t have the permission to run any exec on the hosting-server. But I’m not quite sure if this is even necessary. Maybe there is a way to just clone the finished project (built locally) to the server via a Git repo? I feel like I have searched the whole internet already…
So all in all, I’m really confused right now an am looking forward for some clarification by you.
Did none of the topics in the deployment category here help?
I deploy projects to many kind of servers. Root, Virtual and shared.
For all I use TYPO3 Surf which has some prepared configs for Neos.
Others use deployer. Here is an example config https://github.com/jonnitto/neos-deployer
The basic way is to build your project either locally or on another server and then deploy it where you need it. If the shared server has composer etc you can do it there. If not you have to do it from another system.
Others just connect via ssh, git pull and then do composer install etc. or put all those steps into a custom script.
Surf and deployer internally do the same but with a nicer API.
I’d say, the most important bit is, that you get your Composer setup right and feel confident with what Composer does. Basically, what you need in order to deploy Neos manually on any server is:
the Git repository of your project (we usually call that a “distribution”), including an up to date composer.lock which contains pointers to all the depdencies
a database dump or content in your site package which your can import with ./flow site:import
the content of your Persistent/Data/ directory, which contains the binary data of all images etc you uploaded
The rest is just transferring these to a server with the necessary requirements. To be honest though, there can be some pitfalls when it comes to the PHP CLI version or file access rights, but once you know the drill and have setup the server correctly, it’s easy to repeat.
As Sebastian mentioned, there are good tools which make deploying Neos easier, among them Surf and Deployer.
For Flownative Beach there’s no deployment tool required, you simply configure your Git repository URL and the rest is built and deployed automatically. (Disclaimer: I developed most of Flownative Beach)
first of all thanks a lot for your quick responses, sorry that I took a while to reply.
I am still not entirely sure how I should use the Neos CMS. As far as I understand, it can either be developed locally and then only some files need to be pushed to the server or it can be installed directly on the hosted server, right?
So if I were to use the second method, my server needs to let me run exec or ist there a workaround?
generally, it’s not recommended to develop a Neos site directly on a hosted server. In fact, the few projects I know of, who tried that, ended up in a big mess and pain for the people involved.
This is true for most web projects and isn’t unique to Neos. However, Neos was specifically designed to be developed at a safe place and then deployed to a server. That’s why we don’t provide a way to update Neos via the user interface. Neos assumes that, once it is running in “Production” context, there are no code changes anymore.
But don’t be afraid of setting up Neos for development on your computer. It’s quite easy, once you got a start. And you’ll have all the advantages of Git, even when you are developing the project on your own.
I actually already have a more or less working local setup, although there are sometimes strange errors. For example when im trying to change something in the preferences etc.
I also tried cloning the files onto the server, but not knowing which files need to be on there and what else I need to change I did not have any success. So that is really where I am stuck since a few weeks. Would it be possible for you to explain which steps need to be taken to get a locally built website onto the server. That would be really really helpful.