Trying to optimize a wordpress site. When a browser requests static images, it sends cookies with the request from the main domain, but the server ignores the cookies. These cookies are unnecessary network traffic. To workaround these issues, I am trying to make sure that static components are requested with cookie-free requests by creating a subdomain. And it also helps in parallel requests thereby loading my site faster.
I created the subdomain accordingly, I changed the the uploads_image_path in the "wp-admin/options.php". And every image seems to be redirecting to my subdomain, except all my woocommerce images.
Example:
example.com/wp-content/uploads/2018/07/image_name.jpg
should change to
uploads.example.com/2018/07/image_name.jpg
If I can't redirect my my woocommerce images, it renders that one strategy absolute, because woocommerce contains most of my images. Am I missing something?
解决了这个问题,更改“ example.com/wp-admin/options.php”上的路径不会写入“永久更改”。我必须直接进入数据库中的选项表,更改“ upload_url_path”和“ upload_path”到我的子域。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.