Help me! I have to modify "php.ini" for my wordpress website!!

February 27, 2015 9.8k views


In fact, I didn't know about the Linux as well.
But I just know that VPS HOSTING is better than web-sharing hosting.

So i chose yours for my web site in wordpress
and I bought one wordpress theme that is about 10M.
and i tried to apply the theme..... but
I see the message below from wordpress

"The uploaded file exceeds the uploadmaxfilesize directive in php.ini."

I read many – possibly dozens – of posts on and other sites about this problem. They suggest me that i have to increase my WP upload file size to 32MB with correting php.ini file. Someone change it as the following text :

    max_execution_time = 90
    max_input_time = 300
    memory_limit = 64M
    post_max_size = 32M
    upload_max_filesize = 32M

My question is so simple!

How can I modify the "php.ini"
Can this modification resolve my uploading problem?

I can't even see the where is server and files for my website.
Please help me, considering that I don't about Linux well!

2 Answers

vim /etc/php5/apache2/php.ini
or if you're using nginx (which I doubt)
vim /etc/php5/fpm/php.ini

hit / to search, enter uploadmaxfilesize and Enter. Get the pointer to the corresponding value that's set there and hit i. Delete/Backspace away the value and change it to what you want it to be. Then hit Escape. Begin with search until you've properly edited the file.

Then hit :wq! which saves the file.

You may wanna service apache2 restart (or nginx depending on which webserver you run).

  • Thanks so much!!!

    You saved me :)
    All problems were resolved!

    By the way, I ordered a book about Linux.
    I think that I have to study about Linux

  • Hi, I am having the same issue. I followed the instructions above, however when I get to the save function I get the message /php5/apache2/php.ini" E212: can't open file for writing. Not sure where to go from there, please let me know what I a doing wrong here...Thanks in advance for your help!

  • You either forgot the /etc/ before the /php5/ or it may be that a) you're logged in as a user that is not allowed to write to this file, b) that this file is located somewhere else (p.e. a self compiled php, your distro keeps it somewhere else...), c) Special restrictions have been made to let this file be unchanged (p.e. SELinux, chattr ...). First list the directory structure for the file containing path then go and edit it ;)

can someone make video noob so much

Have another answer? Share your knowledge.