Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

All code examples must follow the Markdown rules as this site uses Markdown. If you don't know how, click here for a tutorial. Any code examples not using Markdown will be deleted.
All code examples must follow the Markdown rules as this site uses Markdown. If you don't know how, click here for a tutorial. Any code examples not using Markdown will be deleted.

VPS and DEDICATED server tips.

I'm not a pro and don't claim to be but here's my contribution to new folks that are still wondering what to do to run a successful server.

  1. Which host to host on? Look for 3 simple things on the host. Make sure they ALLOW admin features such as custom filesize uploads, they are not SHARED because shared limits file counts so if your site has over 200,000 files it's banned, and finally make sure your host allows root as some customizations require root to make things work.

  2. Make sure your VPS is above 1GB ram. Anything less is not good for a social network. Much database and connections will burn up the memory in a few loads. Not good for a social network since it uses tons of DB connections and memory.

  3. Dedicated server. It is best to host a Social Network on a dedicated server. I suggest this due to the powerful cpu and memory your site will have dedicated to it. On a VPS or Cloud you are using resources that are shared although providers do not want to admit it. On a VPS it's either openvz or kvm. Others are similiar but my example is that you are using SHARED hardware with limited CPU % dedicated to you. Even the memory is not guaranteed as it is also shared and split in parts to you. On a dedicated you get the ENTIRE CPU and ENTIRE ram.
    CPU on a vps may say 2 core but that's 2 "shared" cores or just 2% from 1 core. It's not the ENTIRE core dedicated to you.

  4. Self host. You are best to self host as it lowers cost by 80%. For example if you go with a managed plan, that costs tons and you only end up needing support every now and then. Self host you may hire a freelance admin for 20-25 bucks every full moon which is cheaper by far and you own the server. You have access to all the parameters. There is no limiting filesize, no limiting DB connections and no other ADMIN only problems that comes with managed,

  5. How much RAM do I need? You will always need above 1GB. Most cpanels use above 512mb ram and so if you self host you will need to have about 1GB just for the cpanel and OS. WIndows plans will need over 2GB to be ok. I've ran many cpanels and OS and I find that the most effective memory to have for a social network is above 1GB. I am personally using 16GB.

  6. Enable Varnish. Using this will allow your social network to access the DATABASE instantly because DB is loaded to MEMORY for fastest access.

  7. Use a STATIC deliver engine. For example NGINX. Using nginx will speed up your site by 100% due to the fact it delivers your website HTML instantly avoiding usage of CPU or extra memory.

  8. USE two servers for best performance. Make sure they are from the same DATACENTER. Make sure you specify to the provider upon purchasing that you need them in the same center or DATA rack if possible. The idea is having 1 for database and 1 for the site. This stabilizes the performance and load.

  9. USE SSD STORAGE. This is important especially for the database server. SSD will add EXTRA access input/output speed to your sites DATABASE access. This means the site will be more responsive, fast, and error free. Using traditional HARD DRIVE for the site, storage and html is fine. That slower load won't effect the site as it would effect a DATABASE. So hile files and html can take time to load, it won't cause issues and will eventually load. If a DATABASE lags, you are instantly bombarded with problem and so this is why it's suggest that the DATABASE server is on the SSD and higher memory server.

  10. 100Mbit or 1Gbps? I suggest 1Gbps because there are too many providers that sale the 1Gbps for nearly the same as 100Mbit. For example most providers sale 1Gbps server for just a few more bucks. You will also feel less bandwidth spike with a 1Gbps vs a 100Mbit. One example is when multiple users download a file or mp4 stream, your 100Mbit server will lag and the response is noticeable. The 1Gbps will only show a small SPIKE on the monitor and you won't notice a thing. Think of 100Mbit as a tiny straw trying to suck up 1 Gallon. Overtime it does the job but in SHORT time it just won't suck up enough. 1Gbps would be a HOSE size straw and overtime it's no different from the tiny straw as it will do the same thing BUT in SHORT time it could suck up the gallon in FAR less time than the tiny straw could.

  11. Which cpanel should I use? I recommend VESTA cpanel. This cpanel is FREE, it's simple, it does the job, and it comes with NGINX built in. You can't go wrong with this cpanel as it cost you nothing and it's basically NGINX in the box with cpanel built in. Your static problems are gone and you can also TOP it off with VARNISH. VARNISH is simple to install with just 2-3 linux command.

  12. Make sure your provider does not LIMIT DATABASE connections and i/o. This is a HUGE issue on many VPS and HYBRID providers. They will simply reply back to you as blaming your script for accessing the DB too much.

Well I'm not a pro but I'm just sharing a bit of experience I've gained over the years running my websites.
Hope this helps new members to phpfox or any other social networking script.
Through trial and error this will save you a bit of guesswork as I have spent countless days and weeks experiencing these issues had I only had the help to avoid them.

I currently run a DEDICATED and if you need any help just msg me.
I also freelance for cheap and can help setup cpanels, linux, linux desktop remote and such.

GL and may your Social Network become the next FB:)



  • It's also easier to just host your own server from home if possible. That way you know if you have a spare computer lying around, you can use it for the same purpose. I'm sure it's not hard to do.

  • Be careful with that. You need a controlled environment for servers. They need to have the proper temperatures at all times. I know someone that had servers that blew up when he went in the room. I don't know if that caused him to be in the wheelchair or if it was something else but I know he was in a wheelchair when I met him.

Sign In or Register to comment.