0

I look after the site(s) for a large annual event. Each year we want to archive last year's website and the last few years I've done that by making a copy of WordPress in the appropriate directory. https://example.com/2016/ is the whole WP from 2016, https://example.com/2017/ is the whole WP from 2017 and I'm looking at making a /2018/ copy.

Distinct archive sites are definitely what we need rather than multiple years within one WP installation. But done this way, the URLs all change at rollover time. We don't want to use 301s because the new year's site might have a URL clash with those. Maybe John Jones spoke last year and is speaking again so his bio page shouldn't redirect, for example.

So I'm thinking of starting out as I mean to go on and putting the year into all the URLs on the current year's site: https://example.com/2019/speakers/jack-jones with WP for this year sat in the /2019/ directory. But then the home page will be at https://example.com/2019/

I know how to install WP in a directory but use URLs from the domain root as the Codex describes.

I'm usually happy coding my own rewrites properly within WP when my themes and plugins need them. What I can't see is how I might have the home page show up at https://example.com/ but have all the other URLs show the directory for the year.

Put another way, I want to install WP at https://example.com/2019/ with all the URLs starting https://example.com/2019/ except the home page which I want at https://example.com/

  • 2
    This reminds of WordCamps sites. I wonder if you've looked into multisite? – birgire Jan 21 '19 at 15:24
  • @birgire Yeh, I looked at multisite when I built it three years ago. I want the home page to remain (apparently) integral to this year's site though and I think I ended up with the question I now have. – Andy Macaulay-Brook Jan 21 '19 at 15:56
  • For a single homepage, an alternative to multisite, one could e.g. use a HTML file above the single sub WP installs and use REST API to fetch data from the current year's WP sub folder. Many years ago I once used the WP-skeleton setup for three single subdir WP installs, with one of them as the "main site" and the other two as subdomains. That worked. But as usual there are cons/pros for every setup option :-) – birgire Jan 21 '19 at 16:34
  • @birgire It's worth firing up a new Multisite and testing though, so I'll give it a go. Want to reassure myself it's not going to confuse my admin users and having self-contained sites per year has helped enormously there. – Andy Macaulay-Brook Jan 21 '19 at 16:34
  • It kinda feels like you should be redirecting requests for the document root to the current year? As it stands, when it comes to "next year", the old home page has presumably "moved" to /2019/? But you can't issue a redirect because the the "new" year now occupies that URL? – MrWhite Jan 21 '19 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.