## Setup a site in idealstack

Before you can create a site you first need to setup a [stack](/content/help/configuration/setup-stack-cluster/index.html) and a [hosting plan](/content/help/configuration/setup-hosting-plans/index.html)

# Create a site

1. In the Idealstack menu go to _Sites_ and click _Add_

2. Enter the basic settings - the primary domain name for the site, whether it is enabled or not and a description for your own purposes in identifying the site

3. Add any additional domains. You need to list all domains that the site operates on in addition to the primary domain (eg both [www.example.com](http://www.example.com/) and [example.com](http://example.com/) )
   1. Click _Add_

2. Enter the domain

3. Click off anywhere on the page to save
   4. Choose the [stack](/content/help/configuration/setup-stack-cluster/index.html) and a [hosting plan](/content/help/configuration/setup-hosting-plans/index.html) for the site

5. Enter the _Public Directory_. This is the directory inside the user’s home directory where the site’s document root will be. By default this is ~/public_html and this works well for platforms like WordPress. But some frameworks and more complex setups have a subdirectory that is public, eg public_html/public or public_html/web

6. **SSL Certificate**. You can choose to create a free certificate on AWS Certificate Manager to enable HTTPS for the site. To do this you need to approve an email that AWS will send to admin@<the site’s primary domain> (see [https://aws.amazon.com/certificate-manager/](https://aws.amazon.com/certificate-manager/)). Alternatively, you can select _Custom SSL Certificate_, and upload your own SSL certificate

7. **Access** - enter a username for the site. Then setup SSH keys that will have access to this site. You need this in order to access the site over SSH/SFTP to install your code on it. See [Setup SSH key](/content/help/getting-started/create-ssh-key/index.html)

8. **Scheduled Tasks** - if your site needs to run scheduled tasks or cron scripts enter them here. Idealstack runs scheduled tasks in separate containers from the main site that are scheduled using AWS Cloudwatch Events:
   1. Click Add
   2. Enter the details of the task. Specify an [AWS Schedule Expression](http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html) for how often it should run, a command to run, and what container to use

# Apply changes to AWS

To apply the changes to AWS and actually create the site, see [Apply changes to AWS](/content/help/configuration/apply-changes-idealstack-aws/index.html)

# Upload & manage your site

Specific instructions for platforms like [Wordpress](/content/help/tips/how-install-popular-php-apps-aws-using-idealstack/setup-wordpress/index.html) and [PHPMyadmin](/content/help/tips/how-install-popular-php-apps-aws-using-idealstack/setup-phpmyadmin/index.html) are available under [Tips & Tricks](/content/help/tips/index.html)

Otherwise:

1. [Upload the files for your site over SFTP](/content/help/configuration/upload-files-using-sftp/index.html)
2. [Upload the database for your site](/content/help/configuration/create-manage-databases/index.html)
