You have some ways to do that:
In your functions.php or wp-config.php
@ini_set( 'upload_max_size' , '15M' );
@ini_set( 'post_max_size', '15M');
@ini_set( 'max_execution_time', '300' );
In your .htaccess (if you use apache2)
php_value upload_max_filesize 15M
php_value post_max_size 15M
php_value max_execution_time 300
php_value max_input_time 300
If you use nginx
http {
client_max_body_size 15m;
}
In your php.ini
upload_max_filesize = 15M
post_max_size = 15M
max_execution_time = 300
They all work, so you can choose what best suits you, the size is set in MB so all the examples above will set the max upload to 15MB.
Related Posts:
- How to generate thumbnails when needed only?
- Set limit to media upload?
- Save camera info as metadata on image upload?
- Use a separate custom table (not posts) to handle file upload data
- WP 3.3 > Still no option to enable automatic image overwrites?
- Custom upload directory per CPT; when removed, file not deleted
- Modify featured image path to Amazon S3
- How to set an upload directory for each media type?
- How to protect uploads in multisite if user is not logged in?
- Trigger JS when featured image upload window is opened in admin
- uploading files to the uploads folder via ftp
- Modify the array of selected images in media modal
- How can I upload SVG images using the media uploader?
- Delete images uploaded by ‘Subscriber’ role
- Remove upload_files capability from a role but allow role to manage an avatar image
- 3.5 media manager add CSS / JS to new ‘tab’ iframe content
- post_id missing from the wp-admin file upload request
- Insert Featured image from Feed
- How can I upload a csv file into WordPress?
- How to link to the image editor’s Edit Image function?
- Image uploading stuck on “crunching”
- HTTP Error when uploading mp4 video file
- Change the size of the image preview on the media edit page
- “upload_mimes” filter not working. Need to allow WOFF and WOFF2
- Saving WordPress generated thumbnails in a subdirectory
- Whole bunch of errors on WP website – media upload, edit slugs, edit screen not working [closed]
- Add select field to media uploader that adds a class to the image
- Retroactively place uploaded media into -month, -year based folders?
- Can’t seem to upload a file to a custom directory
- wp.media add context
- Conditional add_filter for upload directory?
- Need to download uploaded binary file
- Insert Image automatically when upload finishes wordpress media uploader
- How do I modify the url of uploaded media content?
- WordPress “HTTP error.” when uploading Media – IIS
- WordPress uploads folder path. how it is decided?
- Uploading images on front end doesn’t generate thumbnail sizes
- Filter / Hook to get attachment ID before uploading?
- Adding Media Upload to Custom Options Panel breaks “Insert into Post”
- PDF file upload issue
- WordPress bug with capabilities?
- Update image via WP REST API
- Media Library does not show the uploaded image
- Attach Thumbnail Generated from Video Upload as Featured Image for the Video
- ‘An error occurred in the upload. Please try again later.’ for users with different roles
- Manipulate CSV data during upload, is it possible?
- Check if uploaded file has a specific filename
- How to submit data between wp_iframe and backbone.js in media upload
- Uploading .mp3 files http error – 2 “exact” files one successful other fails
- HTTP Error after finishing uploading a video that is bigger than 64 MB -> After raising the upload limit manually in the wp-config file
- Set post_parent value for the images uploaded by Add Media button into post
- What are best practices to storing uploads in WordPress?
- Original image not saving?
- Restrict role to view own media
- Create featured image from a remote url when creating a post
- Using Add from Server to upload by post ID
- Image resizing – TimThumb vs convert on upload?
- File names are being overridden when uploading new media
- Stop image resizing in particular case – is that possible?
- Change the look of the media uploader
- Issue with images which have no sizes available
- Is it safe to upload JSON files to upload folder?
- Unable to upload file more than 1MB in size
- WordPress media upload issue could not insert attachment into the database
- Thumbnail images missing in WP media library
- Upload media (image) and set the category
- Using Windows Server 2012 How to Move Uploads Folder to another hard drive
- get_attached_file returns wrong path after changing media upload dir
- How to adapt upload_dir to save files outside of WP uploads folder
- wp_generate_attachment_metadata for non-images files
- Reattach media after moving to another server
- Upload a custom csv file, read contents and delete that file
- What if I have a large file on the server that I want the wp library to have?
- Limit image upload to 10
- Bug: Deleting file, then uploading same file again places file in an old month folder
- Can i add custom meta box (Media Uploader) at Category Description
- Complicated image name like flickr does and deny access just to original image
- Parsing the post title to the media box page
- Problems with uploading pictures to WordPress
- Create multiple folders in upload media folder
- Media Library: Remove replace images of selected author
- how to change the max size of media upload? video audio wp 4.9.6
- How to upload multiple images using WP rest API to media?
- How to do action form from functions.php?
- Custom gallery displayin and sorting error
- Using WordPress’s add_cap method to Allow Contributors to Upload Media is not Working
- Access featured image URL based on media ID?
- Import all media referenced in posts
- How use custom upload directories in filesystem and url based on media type or category
- Site Icon upload and display in a theme
- Include file upload button inside post and process file
- get users nickname uploaded media
- owner/group issue on server
- wordpress 3.6 media manager cropping timestamp
- Automatically adding images to a certain page through the Media Uploader
- Disable media upload in rich text editor
- Theme upload fails
- WordPress Custom Fonts Problem! [closed]
- I want to customize wp.media (the wordpress admin uploader) in order to change the file name but only in video custom post type
- Create media folder upon post publish?