Actions and hooks of StaticPress

Actions and hooks of StaticPress

StaticPress has some own actions and hooks. You can use them to upload files to S3 or a server with FTP automatically when static files are generated. This page describes how to use them with samples codes. StaticPress::file_put You can process created files with StaticPress::file_put action hook. This is called just after the static files are generated. This has 2 parameters and they are: $file_dest – the path to the generated file. $url – the URL of the generated file on the static site. * the function “my_s3_upload_function()” is not implemented View the code on Gist.   StaticPress::options_page You can add items to StaticPress setting screen with StaticPress::options_page action hook. You may want to…

Read More →

Hosting html exported by StaticPress on S3

Hosting html exported by StaticPress on S3

Providing static html files output by StaticPress from  Amazon S3, you can have a website with low cost and it will never go down. * This site using this system. This post tells you how to make this site. To host from S3, you need to: Create S3 Bucket to save your contents. Set the created S3 Bucket to use as your web site. Set it to accessible by your domain. Upload your contents to the S3 Bucket. Create S3 Bucket to save your content. First of all, login to you AWS Management Console and open Amazon S3 tab. https://console.aws.amazon.com/s3 Click the Create Bucket button. Fill out the Bucket Name field….

Read More →