• paa1605

    (@paa1605)


    Hey guys,

    I need some help with setting up a subdomain for my images, css and javascript in order to improve page loading times. At the moment i have a fresh wordpress site set up and installed but with no images or css uploaded. For examples sake the domain name is https://mysite.com.

    What i would like is a sub domain named https://img.mysite.com

    On this sub domain i would like 2 main folders, one for the post(product) images, and one for the assets such as css, javascript and actual site images. These will be as follows:

    https://img.mysite.com/img/

    https://img.mysite.com/assets/

    The css, javascript and site images will be in sub folders of assets such as:

    https://img.mysite.com/assets/css/
    https://img.mysite.com/assets//js/
    https://img.mysite.com/assets/img/

    How do i set this up? Do i go to cpanel and click on sub domains? If so i take it i enter ‘img’ in the subdomain box but what should i put in the document root?

    I need to also change the media settings in wordpress so what would go in the ‘store uploads in this folder’ box and ‘full url path to files’?

    I’ve tried to search on google for the answers put haven’t had much luck. If anyone could offer any help it would be much appreciated.

    Thanks,
    patrick

Viewing 4 replies - 1 through 4 (of 4 total)
  • flamenco

    (@flamenco)

    Hi,
    Good question. I’ll share what I know. I also use CPanel. I would simply take what CPanel suggests for a folder, such as “img”, when you set up the subdomain.

    Then I would do the install there, using the subdomain URL. Here’s where I part from your method. I would not recommend playing with the default file structure of WP, otherwise you’ll be in for a ton of extra work, not to mention probably having many many plugins that won’t work, especially image-related.

    If you keep your site there, then you’re done! If you end up wanting to move the site, then you have a couple admin settings, and also some tedious work changing absolute filepaths of images and other related phenomena, that may be possible to alleviate via plugins. (I do database queries for that, others may not be comfortable)

    From the /assets thing, it sounds like you’re using something like my other fave system MODx, which is much easier to move than WP because it doesn’t insist on as many absolute file paths. [And yes, I know they have many reasons for that, so no need to chime in here about that. It’s a hotly contentious issue]

    The good news on “full URL path…” is that on many hosts, this works fine with nothing in there! If it doesn’t work, then you can code just what it says, “https://yourURL/wp-content/uploads” or what-have-you.

    Hope that helps!
    Dave

    rsgrone

    (@rsgrone)

    Just curious since, our site could use a little adjustment to speed it up… Where did you come across that information?

    There have been several posts, and I have posted on the WMPU Premium development forums, and the best we could come up with is major database changes… I believe you need to chunk-up (split) the database to be able to do what you want… I do not belive simply making sub domains will work since, if you are using for instance “Timthumb”, Timthumb will not work on an “external” url albeit, submdoain or not hence, even though you’ve created a subdomain to hold photo’s which, really does not matter since multiple installs will not see all images unless “all” the images are loaded into each database once again, this will simply increase the size of “All” your databases…

    I am still interested in what you are up to though…

    Thread Starter paa1605

    (@paa1605)

    rsgrone

    (@rsgrone)

    Interesting however, as the author of the second link stated, that will only be useful IF you are using multiple images within the same post.. In my case, that is very rare…

    As far as, the Google Link… I am toying with static compression etc, have WP Super Cache installed and still, test from external sites still comeback that I am not delivering a static compressed page…

    I am on a Windows Server 2008 R2 with both static and dynamic compression activated… as well as, am utilizing the cache feature of the server… but still, when I view a page, refresh the page the time stamp changes on each refresh… that is the time stamp presented by WP Super Cache…

    I even installed the plugin cache, I can see the cache working but still, I see no place in the .htaccess or web-config file were any instruction sets have been added to give the site a clue that the plugins are compressed, and static in a separate folder…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Subdomain help!’ is closed to new replies.