Assuming a classified website where real estate agents post their houses advertisement for rent or sale

When I built the server, I separated the database and the webserver

Database Server: Ubuntu and MariaDB only

Webserver: Ubuntu, Nginx, PHP, Redis, Wordpress

I have been wondering all the time what is actually being stored in webserver.

Say, if I destroy the webserver and create a new set of webserver (of course complete with all the same Wordpress plugin + theme), what do I lose?

I think I will only lose the house images that are uploaded by the house agents?

Also, is there any guide to do set up load balancer? Couldn't find a good one so far.

Thanks heaps

  • What is Redis being used for? I'm not sure that an absolute answer can be given here without a full copy of the codebase, a generic answer might not apply to you depending on what the developers have done
    – Tom J Nowell
    Jul 18, 2018 at 0:17
  • Redis is for object caching Jul 18, 2018 at 0:57
  • THEORETICALLY, the webserver has all the files and the database has all the, well, data. So you could delete the files and restore the files with a new copy or whatever and as long as it points to the DB correctly you'll be fine. But in my experience WordPress doesn't like that very much.
    – Joshua
    Jul 18, 2018 at 5:33
  • I agree, except the images in the wp-content/uploads/ --- that's the bit problem Jul 18, 2018 at 21:03

1 Answer 1


The WP database contains everything that is related to content: posts, pages, theme settings, plugin settings, media of all kinds. So if you were to replace the WP database with a brand-new WP database, all of your content - and many of your settings - will be gone.

The WP 'code' (PHP, CSS, JS source files) is stored in the wp-xxxxx folders, plus the site root. Some CSS might be stored in the WP database, but the 'core' code is in the site root and the wp-xxxxx folders.

Can't speak to load balancing...perhaps someone else will chime in on that.

  • 1
    I did some research. You are right, except any media/uploaded pictures go to wp-content/uploads folder. This is the confusing bit on how to set up multi server serving one website Jul 18, 2018 at 21:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.