banner



How To Change Maximum Upload Size In Wordpress

Avatar for John Locke

John Locke is a SEO consultant from Sacramento, CA. He helps manufacturing businesses rank higher through his spider web agency, Lockedown SEO.

WordPress limits the size of media files you tin upload to 2MB. Sometimes we need to increase the maximum file upload size in the WordPress Admin > Media to a number higher than this.

There are a couple of ways to do this. Be forewarned, if you are on shared hosting, these may non work. Shared hosting is only affordable considering the server resource are throttled then heavily. If you are on decent hosting, 1 of these methods should piece of work.

To see what your media upload limits are, go to Media > Add New in the WordPress admin. You should run across a message like Maximum upload file size: 2 MB. The means for increasing your upload limit will depend on how your particular server is configured.

You lot will demand to take FTP access to your server and WordPress installation. Earlier irresolute any files on your server, make sure you take your files backed up, then you tin can restore your original site if something goes incorrect during this procedure.

Method #1: Modify the php.ini File

Most sites have a php.ini file at the root of the server. Depending on the server configuration, it may be in the folder where your site is installed, or it may exist a couple of folders above. Some servers have the root files at the superlative level, and sites in a folder chosen html or www. If a php.ini file already exists, it may be in a folder called conf or etc.

If you already take a php.ini file, open it via FTP with your text editor of choice. Detect these following values and modify them accordingly.

                          memory_limit = 64M upload_max_filesize = 64M post_max_size = 64M max_execution_time = 300                      

This will increase the maximum file upload size to 64MB, and give PHP operations 300 seconds to execute, and then large file uploads practise non time out.

If no php.ini file exists, create one and add the above values to it. Save information technology and upload it to your root (or WordPress root) binder.

Clear your cache and go to Media > Add New. Y'all should see the new upload limits. If you are on a dedicated server, yous may need to restart your server to see the changes.

If your server is running PHP five, you may demand to to create a file named .user.ini and add the aforementioned values.

                          memory_limit = 64M upload_max_filesize = 64M post_max_size = 64M max_execution_time = 300                      

Upload this file to your root binder and check the Media Upload screen for changes to your file size upload limit.

Method #2: Modify .htaccess File

Your .htaccess file is used to configure Apache server modules, only can exist used to control PHP values. Make certain you have a backup of the original .htaccess file in instance things go sideways and y'all become the white screen of death. Just upload your original .htaccess to revert back to normal.

Open your .htaccess file via FTP. Add these lines to the bottom of the file, save and upload back to the server.

                          php_value upload_max_filesize 64M php_value post_max_size 64M php_value max_execution_time 300 php_value max_input_time 300                      

Go back to the Media > Add together New screen to see if your changes have taken upshot. If things go bad in whatsoever style, upload your original .htaccess file.

Method #3: Edit the wp-config.php File

If the first ii methods haven't increased your maximum file upload size, at that place'due south ane final thing to try — editing your wp-config.php file. Since this file controls the installation of your entire site, make sure yous accept your site files backed up before proceeding with this method.

Open up up the wp-config.php via FTP, and at the bottom, or below the Nonces and Salts, add the following line:

                          define('WP_MEMORY_LIMIT', '64M');                      

Navigate to your functions.php file in the wp-content folder ( or Appearance > Editor > Functions in the WP Admin). Add the following lines at the lesser.

                          @ini_set( 'upload_max_size' , '64M' ); @ini_set( 'post_max_size', '64M'); @ini_set( 'max_execution_time', '300' );                      

Get dorsum to the Media > Add New screen to run into if your changes are in identify.

If None Of These Work

If none of the in a higher place methods successfully increase the maximum file upload size on your WordPress site, then information technology'south time to contact your hosting company. They may certain server configurations in identify that are preventing you from uploading files larger than 2MB in size.

Avatar for John Locke

John Locke

John Locke is a SEO consultant from Sacramento, CA. He helps manufacturing businesses rank higher through his spider web agency, Lockedown SEO.

Source: https://www.lockedownseo.com/increase-maximum-file-upload-size-in-wordpress/

Posted by: toddurnow1939.blogspot.com

0 Response to "How To Change Maximum Upload Size In Wordpress"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel