So, you’ve gotten your invite to phpcloud.com and you are ready to fire it up and start building cool things. The question is always “Where to start?” Give me 5 minutes, and I’ll explain a few things.
When you log into phpcloud.com for the first time, you are presented with a screen that has a big blue button, “Start Now”. Clicking this button is the first step. WAIT! Before you click it, let’s cover a few things.
First, what you are about to create is a “Container”. Containers can contain multiple applications and all share a database. Containers can be cloned by taking a snapshot. In some cases, you will want to run a single application in a single container. Other times – as long as you are careful to avoid database table name collisions – it’s fine to run multiple applications inside a single container. If it’s easier, think of a container as a server instance. Whatever you would normally do on a single server, do that with your container.
You are going to have to name your container and the thing you need to know is that the container namespace is global. (Someone already has “test, I checked) As with everything, if you are just playing around, your container name doesn’t really matter since no one else will see it. However, if you are setting up your development environment for work, useful names are better than Loony Tunes Character names.
Once you understand what a container is and what you are going to call it, go ahead and click the big blue button. Fill out the form – don’t use password as the actual password – and click the “create Container” button. phpcloud.com will tell you if your password is weak, normal or strong but it won’t prevent you from using a weak password.
Since this is a fly-by, we’ll skip discussing how to setup an SMTP server but if your application is going to send mail using the mail() function in PHP, you will need to configure one at some point.
Now we play the waiting game. Fortunately for us, it usually takes about 30 seconds to create a new container. While you are waiting, go ahead and download your access key in the proper format. This is your only way to access the code and database in your new container. Because this is a cloud container and not a specific server, you can’t just ssh in and see your code. You can however, create ssh tunnels so you can use your favorite IDE or MySQL tool. There’s a good tunneling overview that will show you want you can and can’t do with an ssh tunnel. Of course you will also need your keys to deploy code either over sftp or git.
Containers are all well and good but they do nothing but contain things. To actually make something happen, we need to setup an application. As mentioned above in the discussion of containers, you can have as many applications in a container as you need. The only caveat is that they all share a common database.
When you created your container you automatically created the default application inside of your container. This default application is an empty PHP application ready for you to start pouring code into. If that is what you need, you can use the default application and not worry about adding applications. If your needs are different though, you can delete the default application and install a new one. phpcloud.com’s application installer lets you setup an empty PHP application, a Zend Framework (1 or 2) application, or one of five open source packages.
Once you have your application setup, you can setup git or sfpt access to start deploying code or you can create other applications inside your container.
That’s it, you are now up and running. If you installed WordPress, you can go to the admin page and log-in. If you created an empty application (Zend Framework or other) you can begin pouring code into it and making things work. There is a lot more that you can do with phpcloud.com; the point of this article was just to get you started.