increasing the media file upload limit

I’m running WordPress 4.0 on Ubuntu 14.04 on an EC2.

I see this is a common issue, but I’ve been unable to change the file upload limit from 8MB to anything.
I’ve tried these suggestions:

  1. Change the max upload line in your php.ini file
    (/etc/php5/apache2/php.ini and/or /etc/php5/cli/php.ini)
memory_limit = 128M
upload_max_filesize = 128M
post_max_size = 128M
file_uploads = On

I’ve tried smaller integers also.

  1. Create the PHP.ini file in the wp-admin directory.
  2. Open or create the .htaccess file in the root folder and add the following code:

php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300
  1. Add the following code in the theme function’s file:
@ini_set( 'upload_max_size' , '128M' );
@ini_set( 'post_max_size', '128M');
@ini_set( 'max_execution_time', '300' );
  1. Copy the php.ini file in wp-admin to php5.ini.

At every try I’ve reloaded apache2 and I’ve even rebooted the machine. Everything is up to date. I’ve disabled all my plugins, and tried different themes. I’ve even re-installed wordpress. I’m really stumped. Any more suggestions?


This stackoverflow suggestion to make a plugin worked:
increase max upload limit in wordpress

Create a file called increase-upload-limit.php in wp-content/plugins/increase-upload-limit/ and write this:

<?php
/* Plugin Name: Increase Upload Limit */

add_filter( 'upload_size_limit', 'b5f_increase_upload' );

function b5f_increase_upload( $bytes )
{
   //return 33554432; //  32 mebiBytes 
    return 134217728; // 128 mebiBytes
}

Then go to wp-admin and activate it.

Note that the PHP file doesn’t have the closing angle bracket. That’s how it works in WordPress for some reason. I’ll have to find out why eventually.

Virtually hosting images from S3

AWS Virtual Hosting

The CNAME DNS record should alias your domain name to the appropriate virtual hosted–style host name. For example, if your bucket name and domain name are images.johnsmith.net, the CNAME record should alias to images.johnsmith.net.s3.amazonaws.com.

The URL of my S3 hosted images looked like this:
“http://photos-crane.s3.amazonaws.com/wp-content/uploads/2014/09/DSC_0232.jpg”

  1. Go to the AWS Route53 dashboard, and click on Hosted Zones, and select your chosen hosted zone, and click “Go To Record Sets.”
  2. Click “Create Record Set”:
    a. NAME: photos-crane (your bucket name)
    a. TYPE: CNAME
    a. VALUE: photos-crane.stephenfranklin.info.s3.amazonaws.com
    a. Click “CREATE”

Here’s a photo. Click or hover over it to see it’s address:
DSC_0231s

Well that didn’t work… I’ll have to figure out later.

hosting a photo from Amazon S3

Hosting images on s3 for wordpress:
sudo apt-get install php5-curl
sudo service apache2 restart

Install these plug-ins in wordpress:
Amazon Web Services
Amazon S3 and CloudFront

1)Create a new IAM user and grant access to the specific services which this plugin will use (e.g. S3).
Go to AWS IAM > Create New Users > “wordpress”.
Download the credentials (User Name, Access Key Id, Secret Access Key).
2) Click on the user “wordpress” > Attach User Policy:
Add AmazonS3FullAccess
3) Copy the folowing code to your wp-config.php and replace the stars with the keys.

define( ‘AWS_ACCESS_KEY_ID’, ‘********************’ );
define( ‘AWS_SECRET_ACCESS_KEY’, ‘****************************************’ );

4) In wp-admin, go to AWS > S3 and Cloudfront. Hopefully it will already have access to your S3 buckets.
Choose the S3 bucket you want to use.

Here are my settings:
unchecked: Bucket is setup for virtual hosting (more info)
checked: Set a far future HTTP expiration header for uploaded files (recommended)
CloudFront Settings: not used.
checked: Copy files to S3 as they are uploaded to the Media Library
checked: Point file URLs to S3/CloudFront for files that have been copied to S3
checked: Remove uploaded file from local filesystem once it has been copied to S3
unchecked: Always serve files over https (SSL)*
checked: Copy any HiDPI (@2x) images to S3 (works with WP Retina 2x plugin)

And here’s an S3 hosted photo:
DSC_0232

  • The wp-admin Media menu seems not to work over https, so you get the broken image icon instead of the actual image, and they won’t upload to S3 or link to a post. But after unchecking the SSL option, uploading, and linking, the SSL option seems to have no effect on the posted images. The only difference in the html of the post is that the SSL option uses a href=https... instead of http.

Here’s another S3 photo:
DSC_0242

apostille

apostille

Phone:  202-485-8000

  9:00 a.m. – 12:00 p.m. and  1:00 p.m. – 3:00 p.m. EST

Monday through Friday

http://travel.state.gov/content/travel/english/legal-considerations/judicial/authentication-of-documents/requesting-authentication-services.html#Fees

  • The authentication fee is $8.00 per document.
  • Checks should be made payable to the U.S. Department of State.

When requesting Mail Authentication Services, please be sure to include the following:

  • A completed Request of Authentications Service DS-4194 form – Be sure to specify the document’s country of use in Section 4
  • Documents
  • Fees
  • A self-addressed prepaid envelope

Mail your complete packet to the following address:

Office of Authentications
U.S. Department of State
CA/PPT/S/TO/AUT
1st Floor
1150 Passport Services PL
Dulles, VA 20189-1150