Support » Installing WordPress » How to host a wordpress blog on a subdirectory

  • Our website is hosted at mysite.com and I would like to have a wordpress blog accessible on mysite.com/blog.

    • I do not want to host my blog on blog.mysite.com.
    • I do not; want to host the blog myself: I’m looking for an hosting provider which will deal with wordpress updates, backups & so on. My job is not to host a wordpress blog and I don’t want to loose my time doing this.

    One solution I thought about:

    • Host the blog on another domain (myblog.com)
    • Update our webserver configuration to create a nginx proxy_pass, for example:
      
          location /blog/ {
              proxy_set_header X-Real-IP $remote_addr;
              proxy_pass https://myblog.com/;
          }
      
    • Update the site URL of the WordPress (as explained here) in order to have correct links (pointed to mysite.com/blog instead of myblog.com).
    • What do you think about this solution? Will I be able to find an hosting provider which will allow me to do this?

      Do you have any other idea?

    • This topic was modified 6 months, 4 weeks ago by  odolbeau. Reason: formatting
Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator t-p

    (@t-p)

    Sounds like a lot of work and plenty of places for things to break to get out of a few minor tasks like updating.

    You might try WordsRack or WPEngine to host that blog but I’d just hang it in a subdirectory called ‘blog’ and put a link to it from the rest of your site to the blog via your menu system.

    You can probably automate the backups and the database optimization tasks via updraftPlus and WPOptimize. Yoast SEO will ‘natter’ at your writers as needed to improve the SEO (if you wish)…

    Install iThemes Security and WordFence and just let it take care of itself.

    Make a habit of checking it once a month to see it still running and login to the dashboard just to have a look.

    You can install the Wapuu Dashboard Pet and look to see if it is happy and move right on to your other tasks if it is. https://wordpress.org/plugins/wapuu-dashboard-pet/

    I know that sounds silly but that little Icon in the footer of the dashboard will keep you informed if you’ll let it.

    We’re not talking a lot of time here as most of it takes care of itself and you’ll probably be the goto guy for the blog anyway. Might as well make it easy on yourself.

    @t-p Thanks for your reply but it doesn’t answer to my question at all. I’m looking for advice on “where” to install a wordpress (given the prerequisites I gave), not for RTFM links…

    @jnashhawkins The “few minor tasks” you’re talking about are not that minor. 🙂 It’s not only dealing with updates but also with backups (what? when? how?), with server load (how many servers / which size do I need?) and with the whole infra (LB? Monitoring? Alerting? …).
    I took a look at wpengine as a friend told me it’s possible to achieve what I want with them but their pricing is really high IMO…
    I didn’t know WordsRack but to be honest I’m not really confident in this company: (really) ugly website, no clients reference, only 2 employees on LinkedIn, …

    Thanks for your help.

    I’m the king of ugly websites… Well, I do have some competition but I can handle that! If Stu is still there at WordsRack then that might be a good bet.

    You can probably automate the backups and the database optimization tasks via updraftPlus and WPOptimize. Yoast SEO will ‘natter’ at your writers as needed to improve the SEO (if you wish)…

    Install iThemes Security and WordFence and just let it take care of itself.

    and I wasn’t kidding about the Wapuu either.

    The rest of this is just writing out a proposal for the boss to reject or accept… else you’ve been given a budget to work within and you’ll need to engineer that.

    You can hire someone to deal with the ‘day to day’ or contract that out.

    What do you think about this solution?

    Your proposed solution would work fine. However, you could host the blog in the sub-directory, thus skipping the need for another domain exclusively for WordPress. WordPress can be installed in a sub-directory, with another application (such as a static web site) on the root of the domain. There are some situation where we want to distinguish the main web site with WordPress, such as when the main site is built using a completely different stack (Ruby or Python based website). Even with a completely different stack for the main site, it is still possible to separate WordPress using Nginx. Basically, the location /blog/ would contain the directives to process PHP.

    Will I be able to find an hosting provider which will allow me to do this?

    Unfortunately, specific host related discussions are not encouraged here (and forbidden at times, as it could lead to lots of spam), except those mentioned at https://wordpress.org/hosting/. As you said about the other host, I have seen some hosts that ask us to choose a dedicated VPS package in order to customise the VPS to fit our needs. And their prices for VPS would be much higher than their standard package/s.

    It’s not only dealing with updates but also with backups (what? when? how?), with server load (how many servers / which size do I need?) and with the whole infra (LB? Monitoring? Alerting? …).

    There is no perfect host. Some concentrate on individuals and small businesses. Some others concentrate on enterprise customers, with LB, auto-scaling, etc. I’d suggest you to search for the one that fits your requirements to the maximum possible extend.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to host a wordpress blog on a subdirectory’ is closed to new replies.