What do i do to edit < wp-config.php > for increasing memory allocated to PHP

Posted March 4, 2015 14.1k views

Unfortunately, I am still a beginner.
So I still don’t know lots of things. and still wait lots of help.

I use the VPS, Ubuntu WordPress on 14.04 (Memory 512MB, Singapore)

  1. Does My Host allow for increasing the PHP memory limit, I want 128MB?
  2. If yes, What do I do to change?
  3. If I change like ‘memorylimit = 128M’ in “php.ini”, I don’t need to edit like 'define('WPMEMORY_LIMIT’, '128M’) ’ in “wp-config.php”

Thanks in advance to everyone who help me with comment : )

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers

You could try:

sudo nano /var/www/wp-config.php
  1. It is your VPS, so you can configure it how you of the advantages of having a VPS rather than shared hosting.

  2. you will edit your php.ini which is located at /etc/php5/apache2/php.ini

  3. edit these lines to 200M or whatever you want:

memory_limit = 200M
upload_max_filesize = 200M
post_max_size = 200M

4.restart apache and see if that works

5.start a notebook or tomboy notes and add that for future reference

  • I think it doesn’t work with editing php.ini.

    I have to edit “wp-config.php”
    So how can I edit this file?

    By the way, Memory limit is 512M in “php.ini”