Does the one click Wordpress install set up swap space?

February 19, 2015 2k views

I need to set up a few WordPress installs and I'm wondering if the "One Click" option includes swap space in the install?

2 Answers

Further, do any of the other one click installs set up swap?

  • It's pretty trivial to add some yourself if they don't. There's a tutorial in the sections above.

  • Yes, it may be trivial, but it would be nice to know. In my mind "One Click Install" means they should have taken care of this.

Just follow this to add some swap ( This is what I do on most servers )

free -m
sudo fallocate -l 2G /swapfile
ls -lh /swapfile
sudo chmod 600 /swapfile
ls -lh /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
swapon -s
sudo vim /etc/fstab

! Add this to fstab:
/swapfile swap swap sw 0 0

cat /proc/sys/vm/swappiness

sudo sysctl vm.swappiness=10
sudo vim /etc/sysctl.conf

! Add below to sysctl.conf:
vm.swappiness = 10

REBOOT and Verify ( shutdown -r now , free -m )

  • I would suggest not changing swappiness since the kernel is way more suited than you at determining when to use swap and when not to.

Have another answer? Share your knowledge.