At the top of your wp-config.php file:
ini_set('upload_max_filesize','4M');
Related Posts:
- Uploading media with the REST API
- Decrease file size upload in Media
- Adding a custom image upload size and making it selected by default?
- Failed media upload: “The uploaded file was only partially uploaded.”
- How to upload imagick resource to media in wordpress
- Make WordPress upload directory outside wordpress root with custom url
- Upload images and attachments from frontend form
- WordPress media upload “HTTP error”
- Memory errors with media upload, WordPress can’t use more than 96M (while there’s 512 available!)
- Is it possible to increase php memory without directives in wp-config.php, .htaccess or php.ini?
- What is the alternative to “ when it comes to calling Media (image) files in the ‘attachment.php’ file?
- How do I get around “Sorry, this file type is not permitted for security reasons”?
- WordPress automatically adds links to uploaded images
- What is the difference in the WP memory limits?
- Get featured image with custom size outside WordPress
- Custom upload folder
- Convert all uploaded PNG files to PNG-8 format
- Hook on file upload
- wp_delete_attachment not working with multiple values
- Can’t upload files
- Edit Image/Image Details – Replace button missing
- How to automatically convert images to WebP on WordPress?
- Difference between php memory limit and wp memory limit?
- Changing WP_MEMORY_LIMIT doesn’t affect actual memory limit
- Upload file could not be moved to wp-content/uploads
- Enable custom logo upload if logo is not in header
- NGINX rewrite rules for multisite
- Attach previously uploaded image to post – current code has unexpected results
- Change WordPress Upload Folder using wp handle upload
- How do I Import / Upload Files with jQuery AJAX?
- Redirect to another page using contact form 7? [closed]
- WordPress function when file is uploaded, deleted or edited
- Can I get an email notification when media is uploaded to the media library?
- Returning data instead of echoing/printing
- How to add API security keys into JS of wordpress securely
- Defined WordPress Memory Limit to Unlimited
- Moving wordpress site from localhost to live server using GoDaddy cPanel
- Blob file download problem
- zip unzip attachments in wordpress
- WordPress import media error
- WordPress get_media_embedded
- Upload multiple files in randomly generated folder using wp_upload_bits
- WordPress hit memory limit but not from the server
- Set site title & tagline with wp.config or function.php
- Can’t upload CSV file to plugin directory using custom upload form in admin panel
- PHP Warning: include(): Unable to allocate memory for pool
- WordPress upload file size error even after raising php limits
- Get uploaded image and attach it to the new post
- Why is my max_upload_filesize being limited to 2M? [duplicate]
- Images Uploaded saving onto older/previous year folders
- How do I increase the upload size only when editing special pages?
- Convert canvas to image and upload image to server
- How to get the filename from file system and create a download link?
- Get URL of Featured Image After wp_insert_post()
- WordPress İmages Upload & Delete Error
- Allow user to Upload image and manipulate it on the frontend
- custom plugin with upload files does not work
- How to Make Thumbnail of Post Stay Animated
- Front end file upload returning wrong attachment url
- Hide media for non logged in users
- Some problems in custom widget
- Checking page before applying image restrictions while uploading
- Change image data durgin upload
- Problem with inserting multiple images in gallery of each WooCommerce product programmatically
- I can’t set image ad fatured programatically
- How can I update WordPress plugins or WordPress itself in all server?
- async upload not working when not logged
- WordPress loading all local images from specific directory?
- How can I redefine WordPress wp-content directory programmatically?
- Trying to generate a CSS file in wordpress uploads folder
- Site cannot access external connection
- Maximum file Upload
- Sudden Upload HTTP errors, PHP uploads and memory limits are already to high to my taste. Anything else?
- Change upload URL by mime type
- Annoying/confusing WordPress memory limit exhausted
- Right path for renaming a file in uploads folder
- Attaching an upload to a user
- Serve cookie free URLs in WordPress without using a CDN
- I want url from a file in media using title file
- Local WordPress from Git repo, where to set document root?
- How to fix UpdraftPlus’s memory issue?
- WordPress file upload
- Upload images from one server to an other in wordpress
- Crop an image after upload on custom account page
- media_handle_upload fails with gravity form submitted image
- Restrict File Type Uploads by User on Wordress via functions.php
- I changed the password for the database user of my website, updated wp-config.php and wordpress asks to be reinstalled
- Resource 404 error on multisite subdirectory install
- Can’t get data from audio media
- Renaming “Expand Details” within “Add Media”
- Get posts associated with media attachment
- Save the outputted image into the Media Library, with a different filename and extension
- 403 (Forbidden) delete file image in themer folder
- File path for attachments outside of wp-content/uploads
- Is custom behaviour possible when asynchronously uploading?
- How to resize an image server-side before upload?
- WordPress will suddenly stop saving files uploaded by my code (ran in nopriv ajax)
- Name Input from widget displays Sidebar name instead of saved data
- show/hide attachments
- File Upload with Server in safe_mode