You can host a static website on |S3|. To learn more, see :S3-dg:`Hosting a Static Website on S3 <WebsiteHosting>`.
The following example shows how to:
- Get the website configuration for a bucket using :aws-php-class:`GetBucketWebsite <api-s3-2006-03-01.html#getbucketwebsite>`.
- Set the website configuration for a bucket using :aws-php-class:`PutBucketWebsite <api-s3-2006-03-01.html#putbucketwebsite>`.
- Remove the website configuration from a bucket using :aws-php-class:`DeleteBucketWebsite <api-s3-2006-03-01.html#deletebucketwebsite>`.
Before running the example code, configure your AWS credentials. See :doc:`guide_credentials`.
Get, Set, and Delete the Website Configuration for a Bucket
.. literalinclude:: s3.php.webhost.import.txt :language: php
.. literalinclude:: s3.php.webhost.main.txt :language: php