How to edit php.ini from ssh

18 Jun

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. Installing LAMP on Ubuntu
  2. Getting .htaccess to work on windows apache

15 Responses to “How to edit php.ini from ssh”

  1. De Web Times 21. Jul, 2008 at 4:54 am #

    this is helpful, thx

  2. Seth 22. Oct, 2008 at 9:08 pm #

    Thank you so much!! exactly what I needed!

  3. Price Comparison 14. Apr, 2009 at 11:29 am #

    This is very helpful. Thanks a lot

  4. paramount 05. May, 2009 at 6:11 pm #

    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

  5. Ray 19. May, 2009 at 12:38 am #

    SOOOOOOO helpful for me newbe.

  6. Janckos 09. Jun, 2009 at 10:48 pm #

    Gracias.

  7. ClayC 13. Jun, 2009 at 6:32 am #

    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

  8. admin 08. Sep, 2009 at 1:15 pm #

    @ClayC

    It’s :wq not ;wq.

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

  9. www.vnwi.com 25. Sep, 2009 at 1:53 pm #

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

    Largest buy|sell machine tool, manufacturing technology

  10. david 25. Sep, 2009 at 7:06 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..!

  11. Joe 08. Oct, 2009 at 11:36 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.

  12. omer 18. Jan, 2010 at 8:08 am #

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

  13. matt 21. Jan, 2010 at 1:20 pm #

    excellent. great tutorial and worked like a charm!

  14. משחקים ברשת 08. Mar, 2010 at 4:49 pm #

    thank you about it

  15. משחקים 19. Apr, 2010 at 1:27 pm #

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

Leave a Reply