Skip to main content

How to Fix "upload_max_filesize directive in php.ini"


While setting up a new Wordpress test site, I encountered this problem while uploading a new theme which file size is 19MB. Is it happening to you, too?

It is important to note that this has nothing to do with Wordpress setup or configuration. It is in the server which your hosts usually put in place to maximize the resources of the server. It can be fixed by changing a parameter in your php.ini file. It can be easily done if your have access to the file. But if you are in a shared hosting environment, you will have to coordinate with your hosting provider's customer support.

Here's how we fix it:

1. Locate the php.ini file. In my case, since I am using local XAMPP, it is located in xampp > php folder.



2. Inside the file, edit the following values:

     upload_max_filesize = 12M
     post_max_size = 13M
     memory_limit = 15M

    You can set upload_max_filesize to your desired limit. Then I would usually double post_max_size and memory_limit.

Popular posts from this blog

Importing Exploit-DB Exploits into Metasploit in Kali Linux for Offline Access

You're going to need three terminals open for this. Terminal 1 for starting metasploit Terminal 2 for importing the exploit to local Metasploit repository Terminal 3 for searchsploit which we will use to search for the exploit instead of opening your browser and looking in exploitdb. Let's be done with it! 1. First, open the first terminal to run metasploit with the following commands: > service postgresql start > msfconsole  2. Go to Terminal 3 and run the following command to update its database: > searchsploit -u 3. Open Terminal 2, then go to the metasploit modules directory by: > cd .msf4/modules 4. Then create a directory inside the msf4 modules folder: > mkdir exploits 5. Now, back to the Terminal 3. We will to search for an exploit we want to import. Let's first try to look for the explore ms15-100 by typing: > searchsploit msf15-100 After pressing Enter, you should be able to see the search result. It will be a t...

Using Termux in Android to Download Youtube Videos

In termux: apt update && apt upgrade Give termux access to your phone's filesystem via ~/storage/shared termux-setup-storage Install python: packages install python Install youtube-dl pip install youtube-dl Create a folder to store your downloaded videos: mkdir /data/data/com.termux/files/home/storage/shared/Youtube Create youtube-dl config (volume-down key emulates Ctrl in termux): nano ~/.config/youtube-dl/config The contents of my config is as follows: --no-mtime -o /data/data/com.termux/files/home/storage/shared/Youtube/%(title)s.%(ext)s -f "best[height<=480]" (the height<=480 tells youtube-dl to download the best quality version up to 480px in width. You can change to 240, 360, 720 or 1080, etc to suit your needs / bandwidth restrictions. Save with "Volume-down" + O, then close nano with "Vol-down" + X Create "termux-url-opener" in ~/bin to enable one-click download via the "Share" menu i...

Extracting Windows Product Key Using Kali Linux

You may have encountered a problem where you need to format a Windows PC but don't have the Product Key. But you don't know the password of the local admin (because of a number of excuses). If you fortunately have a Live Kali DVD you can boot into, you can try using the chntpw application: To look into the relevant registry file mount the Windows disk and open it like so: chntpw -e /path/to/windisk/Windows/System32/config/RegBack/SOFTWARE Now to get the decoded DigitalProductId enter this command: dpi \Microsoft\Windows NT\CurrentVersion\DigitalProductId