Reputation: 6668
I have one big site in WordPress that has many images. I want to speed up site using subdomain to browser load images from subdomain.
I want to point subdomain root to wp-content/uploads/
and instead to load from:
www.example.com/wp-content/uploads/2015/03/example.jpg
I want to load from:
www.media.example.com/2015/03/example.jpg
Where in PHP I can change that?
Upvotes: 1
Views: 951
Reputation: 26
No need using PHP,
your just need to run this this SQL Query in phpmyadmin.
UPDATE wp_posts SET post_content = REPLACE(post_content,'http://www.yourdomain.com/wp-content/uploads/','http://images.yourdomain.com/')
For more information you can refer to this link.
http://www.oxhow.com/host-images-wordpress-blog-subdomain-better-speed/
Upvotes: 1
Reputation: 714
Go to wp-admin/options.php
There you have two options:
upload_path
upload_url_path
Change both and you're all set
Upvotes: 1