When you have a WordPress site it’s important that you are optimizing your site’s images and files so that not only can your site be fast, but also to ensure you can create proper backup files without timing out the server. Nothing is worst than transferring over a website that continues to time out due to bloated image size and a bloated database.
- First you need to make sure you have totally updated your WordPress site. You need to make sure you have a proper back of your site, or at least an export file of the data.
- Sign up for a AWS account by going to http://aws.amazon.com/ you’ll need a credit card, email address, and working phone where you can receive a phone call to confirm your account.
- Start by setting up a S3 Bucket, find the Services > Storage & Content Delivery > S3
- Click the “Create Bucket” button give it a bucket name and click save. I recommend naming the bucket after the web url you are optimizing.
- Now go back to Service > All AWS Services > IAM and set up a new user. Go to Users in the left menu, click “Create New Users”. Name the user something that matches or is easily associated with the bucket you just created.
- Click the “Show User Security Credentials”, copy and paste the Access Key ID and Secret Access Key into a text file like notepads. Or download the credentials by clicking the blue button in the bottom left.
- Click the user you created, and click “Attach Policy” – selct AmazonS3FullAccess.
- Return to your WordPress site and install 2 plugins, Amazon Web Services and then WP Offload S3. Activate them.
- In the bottom left of your WordPress Admin menu you’ll see AWS, click it
- Here you have an option, you can either add your Access Key ID and Secret Access Key using the form, which places your info in the database, or you can copy and paste the code
define( 'AWS_ACCESS_KEY_ID', '********************' );
define( 'AWS_SECRET_ACCESS_KEY', '****************************************' );
Replacing the *s with the key number and putting it into your wp-config file. Make sure to put it just above:
/*That’s all, stop editing! Happy blogging. */
I opt for the later since I am a micro manager. 🙂 — if you did it the second way, reload the Amazon Web Services page and it’ll tell you if you did it right.
- It’s time to connect the WordPress site to the proper bucket. So, in the left WordPress Admin menu find the “S3 and CloudFront” link, click it.
- Click the “Browse esisting buckets” and click the one you just created.
- I use the defaults and have noticed in some cases changing the Domain causes issues, click save changes.
- Test… go to the Media tab and upload a file, check to see if it’s using the new Domain for your image you just uploaded.
Good luck, please let me know if you have any questions.