A 1GB Virtual Private Server to host a medium traffic website is usually a challenge, the challenges are not related to coding or memory usage in normal situations, but a sudden spike in traffic can cause your VPS to run sluggish. A sudden traffic can be a bot scanning your website, or your competitors scrapping your website to know about your SEO, or a scrapper fetching your website content, or an attack on your web server port can cause sudden boost of traffic affecting your website. So again, the question is, can your host your data on a 1GB server.
For hosting on limited amount of memory, you will need to optimize your server completely. If you are using cPanel, then there are few settings in cPanel to speed up things, then you can turn off services that you are not using such as if you are not using it as a mail server and are using SMTP connections on your website to send email, then it would be good to disable email service on your server Also, if your server is not hosting DNS and you are using third party DNS provider, then you could save some memory by turning off DNS server. Also, if you are using Apache web server for your hosting, then you need to carefully choose your PHP handlers, as some PHP handlers offer security while other offer speed.
Also there are some caching techniques that can be used, one will be a server level cache such as opcache which allows PHP to run multiple times faster on a system with thousands of PHP files. Other can be a page cache technique that would allow your system to save a static version of the dynamically generated page and serving that static file on subsequent requests. Apart from local caching, there are options available to cache your website images on CDN to save some bandwidth and also reduce requests for resources to your VPS thus reducing memory footprint.
No matter if you are on a 1GB VPS or a 8 GB one or even on a dedicated server with 128GB RAM, there are so many optimization techniques that can be utilized to reduce TTFB and get the website to load faster. Let us know if you need your server optimized for high performance.