The Ways To Solve The Issue Of The Upload_Max_Filesize Error In WordPress

Understand The Issue

WordPress is an amazing site that many people may use for their blogs and other types of sites. Before you solve the problem you have to understand why the problem occurs because of uploading large files, themes, and images. Because there is one setting you may be unaware of, you will be facing this error. The setting is a server-side setting that limits the file size to be uploaded under a limit. This is an issue that can be solved even if this is because of a server-side setting. You just have to follow some simple procedures to upload with an error like this.

Conditions To Solve This Error

This error can be solved, but before you can be able to solve this problem, you need to fulfill some conditions, which are as follow:

● You should have installed a working WordPress.

● Access to the WordPress installation server hots.

● A File Manager or you can say a cPanel when you are working for a client.

● Sudo privileges user account.

● It's optional to have access to the command line or, in other words, access to the terminal window.

You will succeed in solving the error by yourself if you meet these conditions. Just follow the steps mentioned carefully in every way of solving this max size error in WordPress.

The Methods To Solve This Error

This is a server-side error, but with access to the server, you can change this error and increase the max size to some other value. The methods are as follow,

  1. Using The Command Line Interface To Edit The .HTACCESS
  2. Getting Support From The Host
  3. Editing The PHP.ini File
  4. Editing The File Of .htaccess File( cPanel)
  5. By Editing The WP-config.php File
  6. Editing Wp-Config. php File Using The Command Line Interface

All of these methods may not work because some settings are restricted. If you can access them, you can edit the max size upload limit on the hosting server. This is a server-side error, so people may think that this is not possible but using these methods that we will explain step by step, you can solve this error.

Using The Command Line Interface To Edit The .HTACCESS

Follow this step by step guide to solve the error using this method,

● Step 1, first, you need to access your WordPress site hosting server.

● Enter the "cd /path/to/WordPress" command on the command line interface to get access to the directory.

● Use a text editor of your choice to open the .htaccess File with this for example. You can use ATOM or NANO editors.

● When you open the File, search for the php_value upload_max_filesize line and edit the value of size as per your needs. This editing will change the server-side setting for upload size as per your need to upload.

● In the end, there is nothing more left to do than saving the settings and leave.

This is a simple way to solve the error problem. By yourself even when the error is from the server-side.

You may have some doubts related to the terms such as the command-line interface, using this you can update plugins, configure multisite installation on your website. Cd/path/to/WordPress refers to the word press directory where you find the files and then use a text editor to change the max size on upload.

Getting Support From The Host

Whatever way we are explaining might not work because of the server hosting servers. It is a server-side issue so sometimes the only option is to contact the server and make them edit the limit. Your hosting service providers may have imposed some limits on your ways of editing the settings, which is why things may not work, so the last option is to contact them. No server host will upset their users, so you will surely be able to get a good response from them to solve this matter. You are not asking for any help so don't hesitate to tell them as this is part of their normal services to configure the hosting for you.

Uploading content on your website may be necessary, the limits are enough for any kind of File to be uploaded, but sometimes that size is bigger than the mentioned limit. In this case, the most convenient option is to contact the server host and get this error issue solved.

Editing The PHP.ini File

Follow these steps as explained to solve the max size error by editing this php.ini File,

  1. First, access your WordPress site by logging into your WordPress site.
  2. Next enter" cd /etc/php/7.0/cli" in the interface of the command line. Make sure you enter the exact as mentioned.
  3. Using the text editor of your choice, such as nano, open the php.ini File.
  4. Now you just have to locate the "upload_max_filesize = 100M" in that file.
  5. Change the limit, which is at 100 to something bigger than this value. Before you edit, you should know for what configuration the File will allow,

○ 256M, it's the max size that can be used by a script. It's the limit of the memory.

○ You can also set the total of post data. It will set the max size to that value.

○ Max execution time 600, time is in the seconds for the script to be allowed to run.

○ Max input time 900, the max time allowed for a script to parse input data.

  1. Press save and then exit.

For this option, you have to do things by yourself there would not be support from the hosting service provider.

This File is a configuration file for the variables of PHP. The above-mentioned steps show how to edit the File and edit this enough to solve the error. You can now upload the File in the size which was snowing and error before make sure to check it carefully.

Editing The File Of .htaccess File( cPanel)

The steps to solve the error using this method are as follows,

● Launching the file manager in cPanel

● Click on the .htaccess File and select edit.

● Edit the line php_value upload_max_filesize into php_value_upload_max_filesize 256M, you just need to explore the file.

● Save the File with changes and exit.

If you can not find the .htaccess File, you need to click on the settings' upper right corner. Search the option to show the hidden files. This method is the simplest one and is working for your WordPress site, if this does not work, you can try other methods.

By Editing The WP-config.php File

You will directly change the configuration file through this method, so make sure you do this carefully. The steps to do this through the configuration file is as follows,

● Use cPanel to access this File. The name of the File is the same, wp-config. php file.

● Find the wp-config. The File then clicks on the File, after that, you will see several options, but you have to select edit.

● Find the line "/* That's all, stop editing! Happy blogging. */" and over this line.

● Above the line, you need to add another line which is @ini_set('upload_max_size', '256M');.

● It's done, now you just have to save the changes and exit out of the File.

This method will work if the server host allows its users for this setting, if not then you can also try other ways to solve the error on your own.

Editing Wp-Config. php File Using The Command Line Interface

This is the last method to solve the error, you just have to follow some simple steps for this, such as the following,

● Access the hosting server of your WordPress website.

● Enter the command" cd /path/to/WordPress" to access the WordPress directory.

● Choose a text editor and open the wp-config. php file, you can use any of the text editors.

● You will find the line /* That's all, stop editing! Happy blogging. */ in that File.

● Write @ini_set('upload_max_size' , '256M' ); above the line.

● Save the changes in the File and exit.

Using this method you can solve the problem and it will work if these settings are not restricted to use.

How To Check Your Max Upload Size?

While using WordPress sites there are many times when we have to upload large size resources. A better theme will be large in size and other things such as an image or video will also be the same. At the time of uploading these things on your website's server, you may not know about the max size of the File to upload. It will be shown at the time of uploading the File on your website, make sure you change if you need or upload the File under that limit. Using any of the methods you can also check that and edit them as well, increase the max size if you need that.

Why WordPress Restricts The Max Size?

This is not because of WordPress, it's a server-side setting that may be showing like this. When you upload a file to those servers it's restricted by the servers to upload the File under a certain limit. This is a setting that is used to save you from filling your website's server, you can understand that there is a limit on this so WordPress max size and it's an error only occurs when you upload something over that size. When it's done you can upload the File in your desired size on your website hosting servers.

Should You Do This By Yourself?

The steps are easy for you to do by yourself, make sure you follow the steps as they are mentioned. It may cause a problem if anything is edited wrong, just edit the things that are mentioned herein in every method. Editing anything else may result in other things and then you will not be able to find the cause of that new problem. When you only edit the required things the problem gets solved easily if you are allowed to change any setting by the host of the server then there may not be a big issue. You may not want to face even the slightest error so make sure you only edit this one thing and increase the size of the upload limit on the WordPress website hosting servers. To be on the safe side you should directly contact the customer service office of your website host, it may be complex for you to access things and then change them.

Everything In Brief

One of the methods must be the solution for this error, doing this will solve this but you must have everything that is required such as access to the server. You may be working for a client, in that case, you should ask them for access to solve this error for them. There are five methods that you must follow to solve this error on your and the sixth solution is to contact your web host to get support. This is easy, you must try all of the methods so one of them should work for you, it's easy if the settings are allowed to you by the host.

Check with your host whether they can solve this issue for you or not. File size matters a lot sometimes the file size is bigger than the limit so when it's necessary to upload a file in a bigger size you will have to do these settings. After doing these settings you can upload files of any size, whether it's a theme, image, video, or any other file.

Learn more :
Freelance Websites Are The Best Ways To Build Your Career

Want To Buy Cheapest VPS? Here Is A Quick Guide For You

Start now for as low as $3,99 a month!

Open livechat