Would it be possible to host wp-content on another domain, so that all the uploads and images would go and load from there?
If so, how would I go about configuring wordpress to do this, preferably without using a third-party plugin?
Leave a Reply
You must be logged in to post a comment.
In WordPress Dashboard > Settings > Media and fill the field “Full URL path to files” with your other domain. See the screenshot below:
EDIT: I thought it would be obvious, but it isn’t. Here’s what you exactly need to do:
You should map your domain to point to:
public_html directory, IF it’s also your WordPress installation’s root directory.
public_html/subdirectory/ directory, IF your WordPress installation is in its own subdirectory.
If you have a custom path set in “Store uploads in folder”, then your domain should point to the directory ABOVE the custom uploads directory.
For instance, lets consider this is how your settings are:
Store uploads in this folder:
media/uploads/
(implies public_html/media/uploads/ directory — which is, as you guessed it, outside your WordPress installation directory)
Full URL path to files:
http://newdomain.com
Then, you should make sure, http://newdomain.com points to public_html/media/uploads/ directory.
Now, add the domain (or sub-domain) in the field shown in the screenshot above. Simply adding the domain, without mapping it to your WP installation, won’t do the job.
If you don’t know how to point your domain, it’s a totally different question, and is out of the scope of WordPress.StackExchange. Google it, you should definitely get your answers. 🙂
And as for hosting your images on a different server and different domain, you have no better choice than W3 Total Cache <– yes, a caching plugin for WordPress.
My second aswer:
to use other server it’s not easy, to use your subdomain, lets say media.domain.com it’s not hard, once i used it in my price compare site done with WP. The main sthing to speed up loadin times is to use diferent domains, and subdomains is good to, cause browsers will open new connection for them too. So use this tutorial: http://www.computingunleashed.com/host-images-in-sub-domain.html
Server will be the same, bat browser will create new connection to load images, so loading times will be shorter (if server is not slow).
Paste this to your .HTACCESS file:
This will tell browser to cache all javascript, images, css to computer, so images won’t be downloaded from you until they changes.
You can use Best browser- chrome to test it with ctrl+shift+j in timeline you can actually see how much time took to download images, the cached ones usually takes 25 ms (cause server first have to say: files is not changed so use the local copy 🙂 )