Website Optimization Methods for Building Websites

Configuration Optimization

This site uses the Baota panel to configure the website building environment, running in the nginx+php+mysql server environment. Optimization methods include:

  • Directly configure nginx and increase gzip compression ratio
  • Directly configure mysql, and adjust accordingly based on server memory size
  • Directly configure php, install specified extensions, and increase script memory limit

Performance Adjustment

In the Baota panel, select 2G memory concurrency to improve php performance, and make corresponding configuration adjustments to the server mennached and redis. Specific modifications include:

  • Increase mennached cache size
  • Modify the redis port and add a password

Other optimizations

In addition to the above configurations, website-related settings can also be done in the Baota panel, such as pseudo-static, SSL settings, redirection, etc. In addition, the Baota panel provides anti-hacking functions to enhance website security. During the website construction process, mennached and redis can be used for database caching, batcache plugin can be used for webpage caching. At the same time, utilize the ngx_pagespeed module to enable nginx caching, and install the opcache extension to enable php caching.

Upyun CDN Configuration

For dynamic servers, UPYun CDN cache control parameters follow the entire process. In conjunction with cloud storage, both images and videos can be accelerated in cloud storage. The configuration has disabled HTTP 302 scheduling and redirect following to speed up site access. Other configurations on UPYun CDN are generally all enabled to optimize website performance.

Website optimization plugins

This site is built using WordPress, utilizing the WPJAM Basic plugin to optimize the acceleration of Google fonts and avatars. Other features such as adding image timestamps, removing the category from the category directory, and other settings can be easily achieved through plugins. It is recommended to customize the configuration according to specific needs to achieve the best optimization results.