Appfog Free Hosting for Beginners.
Wall Script
Follow Me:
Sunday, November 25, 2012

Appfog Free Hosting for Beginners.

AppFog is a cloud hosting platform and they are offering unlimited applications with in 2GB RAM usage. This is the best place to experiment your projects, specially for beginners. This post explains you how to setup an application and upload files into the AppFog hosting platform.

Appfog Free Hosting for Beginners

Live Demo

Just create an account at and then you will find out the following screens.

Step 1
Choose an application technology.
Appfog Free Hosting for Beginners

Step 2
You can choose a cloud platform.
Appfog Free Hosting for Beginners

Step 3
Choose a subdomain
Appfog Free Hosting for Beginners

Mission Control
Here you can control the application instance.
Appfog Free Hosting for Beginners

Choose database service.
Appfog Free Hosting for Beginners

CName Configuration
Go to your domain registration website and choose DNS settings and add new CName record.
Appfog Free Hosting for Beginners

Domain Names
Appfog Free Hosting for Beginners

Install rubyinstaller for Windows
Appfog Free Hosting for Beginners

Update Source Code
Start -> Ruby -> Start Command Prompt
// Install appfog
C:\>gem install af
// Create a sample folder
C:\>mkdir test
// Copy files into test directory.
C:\>cd test
// AppFog Login
C:\test>af login
Attempting login to []
Email: [email protected]
Password: *******
// Upload files into AppFog could.
C:\test>af update app_domain_name // Eg: 9lessonsdemos

Database configuration file for MySQL service.
$services_json = json_decode(getenv("VCAP_SERVICES"),true);
$mysql_config = $services_json["mysql-5.1"][0]["credentials"];
$username = $mysql_config["username"];
$password = $mysql_config["password"];
$hostname = $mysql_config["hostname"];
$port = $mysql_config["port"];
$db = $mysql_config["name"];

If you want to setup Wordpress, just find and modify wp-config.php with below code.
$services_json = json_decode(getenv("VCAP_SERVICES"),true);
$mysql_config = $services_json["mysql-5.1"][0]["credentials"];
define('DB_NAME', $mysql_config['name']);
define('DB_USER', $mysql_config['user']);
define('DB_PASSWORD', $mysql_config['password']);
define('DB_HOST', $mysql_config['hostname']);
define('DB_PORT', $mysql_config['port']);
Was this article helpful?
Thanks! Your feedback helps us to improve


  1. hello, is this have a ftp access, or by command prompt only?

  2. Great to know about new APPFog Free hosting tool.

    Srinivas Tamada, you are very good writer, but it is very long time to see you here.

  3. Nice one. Could you please tell me how can I upload existing database dump?

  4. Hi. Found this useful. Can you write how to use af command in Linux. It isn't working on Linux.

  5. yeah, i'm using it right now..

  6. Thanks for sharing, works for me!!!

  7. Error : <?xml version=”1.0” encoding=”u….

    i getting this error when i uploading php files can any one face the same problem .if any one with the solution please let me know .

    Srinivas please help me if have solution of it

  8. Error : <?xml version=”1.0” encoding=”u….

    i am getting this error when uploading a php project . if any one getting the same problem and have a solution please help.

    Srinivas if u have any idea of the problem please share.

  9. thanks for sharing does they support asp hosting as well?

  10. its really awesome
    i tried wordpress its working
    thanks Srinivas for the info
    is this free for life

  11. In dbconfig.php
    the username, password, hostname etc etc are given by Appfog or we can give our own information.

  12. i think it will be useful when we have domain na

  13. Ho to configure and update existing database of mysql in for using ruby application to Appfog.

  14. This Information about Free Hosting is very useful for us. This is appreciated by my kind of new beginners. Thanks.

  15. Finding a good web host is a task full of hazels. AppFog is really a good cloud hosting platform and the best thing about their service is they are offering unlimited applications with in 2GB RAM usage.

  16. Please help.
    when i'm applying this step "C:\test>af login"
    i'm getting this message.
    C:\test>af login
    'af' is not recognized as an internal or external command,
    operable program or batch file.

    Note: Ruby192 was already install in my system.

  17. Srinivas,
    Nice job. This was much more helpful than the quickstart at appfog.

  18. need hosting website for java or jsp, will u pls say

  19. It is good plataform to learn but don't like because AppFog Doesn't have a persistent file system. you can't upload images or files with your CMS

  20. everytime i edited a file, i upload all project, how can i change that?

  21. everytime i edited a file, i upload all project, how can i change that?

    is there anyone can help me?

  22. How to add custom domain. It shows error while add custom domain.

  23. I have purchased the theme from, how can I deal with it? can you please let me know


Make in India