How to edit php.ini from ssh

Type:

1. “cd /etc”
2. “ls”

Check that there is the php.ini listed if not you will have to ask your hosting provider where it is.

3. “vi php.ini”

Find the bit in php.ini you would like to edit.

4. “i” – This enables you to edit the php.ini file

5. After changing the file, please Esc.

6: “:wq” – (w = saves the file, q = quit)

7. reboot your server and your done.

Related posts:

  1. Getting .htaccess to work on windows apache
  2. WordPress Database Backup Plugin 2.0.5 not working
  3. SSH Mysql command line
  4. SSH Commands for FTP

15 responses


Do you want to comment?

Comments RSS and TrackBack Identifier URI ?

this is helpful, thx

July 21, 2008 4:54 am

Thank you so much!! exactly what I needed!

October 22, 2008 9:08 pm

This is very helpful. Thanks a lot

April 14, 2009 11:29 am

Hi, just a small query. Will this change erase the contents on the server? Do I have to reinstall the website again after finishing the steps and restarting the server or will the steps stated by you will have no effect on the contents, database etc, but will only modify the php.ini file as desired?
Many thanks in advance

May 5, 2009 6:11 pm

SOOOOOOO helpful for me newbe.

May 19, 2009 12:38 am

Gracias.

June 9, 2009 10:48 pm

the ;wq didn’t happen to me… I try press the keys but the windows beep sound keeps coming up -.-

I am still struggling this to maybe make it work xD

very good tutorial thought, if possible please tell me what’s wrong with my SSH thingy

Thanks alot

June 13, 2009 6:32 am

@ClayC

It’s :wq not ;wq.

That might help. Otherwise sorry no idea why it might be doing that.

September 8, 2009 1:15 pm

Thanks , i have susseccfull config my VPS server by your stuff :

Largest buy|sell machine tool, manufacturing technology

September 25, 2009 1:53 pm

Thanks for this tutorial!
This was a great help and like you i’m not too familiar with SSH commands, i managed to update my PHP ini file and now my upload limit has been increased.
Many thanks..!

September 25, 2009 7:06 pm

Hi, being a windows techie i hadn’t a clue how to edit the PHP.ini. It took me ages to your so user friendly way to find and edit the file. Although I want to become more familiar with Linux I find most of the info from competant users over techie. They give an answer but without the ‘how to do’. So a big thanks, keep up the good work.
P.S. I’m book marking your site for future answers.

October 8, 2009 11:36 pm

Many thanks! this really helped me with an installation i had (i know nothing about PHP, Linux etc…)

January 18, 2010 8:08 am

excellent. great tutorial and worked like a charm!

January 21, 2010 1:20 pm

thank you about it

March 8, 2010 4:49 pm

nice post.. thanks u a lot for this post.

April 19, 2010 1:27 pm

Comment now!
















Trackbacks