A friend of mine would like to port their Wordpress site onto my server where I run my Grav website, so that they can exploit all the features of Wordpress without paying for their own server. I’m curious to try, but I’m worried that it would be much more complicated than I anticipated.
Since I’ve had a lot of help on this forum before, I thought I’d ask if anyone has any advice, thoughts or tips on the subject, even if it’s not strictly Grav related
@gobs : I think this should not be a problem, just create a dedicated Subdomain for the WP Installation, e.g. wp.gobs.eu with root in /home/wp/www/html , config file
/etc/nginx/sites-available/wp and install WP in that Subdomain.
note that I don’t know much about nginx, but I’m sure creating Subdomains with nginx is well documented.
but, to be honest, I do not really understand what you mean with you first sentence: porting a WP Site means for me, the site does already exist elsewhere, right ?
so why porting it to your server, additionally ?
@hoernerfranz thank you! That sounds straightforward enough, I’ll try it out and hopefully I don’t have too many problems.
By porting the WP site: I mean that currently my friend has their website on wordpress.com, and so has limited access to features, e.g. modifying themes, hence why they want to port it to my server (to be able to modify themes and avoid paying for a server themselves)
ok, porting a website from wordpress.com to be able to modify/enhance things makes sense.
and, as said, doing this in a subdomain of your existing Installation will not interfere with your own site.
just be sure you have access to a mysql instance for WP (Grav does not need one).
no, of course not - the advantage of a subdomain is usually that it does not create additional costs, as opposed to another domain, which normally has to be booked/paid at extra costs.
A lot of what you are worrying about, @gobs, are not problems.
What can be a real pain is Wordpress: migrating it and managing it (if that’s your job). I hosted Wordpress for a client when she got kicked off her shared host because the site was consuming shared resources and we couldn’t find the cause.
Wordpress needs constant updating. Because WP is insecure (it’s very old and a huge target because of its popularity and poor plugins), I didn’t want to do this. I ended up hosting it in a Docker container so it couldn’t (shouldn’t!) compromise other sites on my server. So you might consider security implications on your server if you don’t have some way to isolate WP.
I only agreed to host WP because my client was stuck, I like her and her site, and because we were redeveloping in Grav Also because I had the Docker solution.
I have another client who needed WP hosting last year. I accepted that too because I have a Dreamhost account where they manage the updates for me and it costs me nothing more, plus they host her email at no cost me either.
You probably need a plugin to make the WP export/import run smoothly.
I think you might be taking on more than you expect but it depends what your arrangement is. The migration is tricky and there will be a stream of issues.
You will gain a renewed appreciation for Grav and flat file CMSs
Hmmm, thanks for the headsup re WP. I think I will try anyway, since if my friend would translate her website into Grav it would also require a lot of work from me (while I like Grav, editing templates etc is quite involved and my friend “does not want to code”, so I would have to make those changes for her).
@gobs - I can only second what @hughbris wrote about wordpress, and even add some more complaints .
I have done the transition from WP to Grav long ago and never looked back, see this blogpost.
of course, as stated, the work required for this process can vary from ‘easy’ to ‘really much work’ depending on the situation (plugins, theme…).
I’ve started working on this properly, but now I’m having some doubts / getting confused. I’m following this guide and I’m wondering whether the Nginx docker container will “clash” with Nginx outside the container? Would there be some confusion if both websites use ports 80/443?
well, if you just follow the mentioned guide and also have an nginx instance running outside the docker container(s), it will clash.
what you need, is separate the two by configuring a different subdomain for each one, see this link for example.
or, you could use different ports for nginx outside (e.g. 80) and inside (e.g. 8080) the docker container - this is very simple, but will be problematic for port 443 (the ssl port) which cannot be changed as easy.
the correct solution for this is a reverse proxy, IMHO, search for ‘nginx reverse proxy subdomain’, you will need this also for the first proposal.
I have fiddled with apache2 reverse proxys for some time in the past and found it rather awkward, then discovered Caddy, which is much easier, see https://caddyserver.com/docs/quick-starts/reverse-proxy.
but maybe nginx is easy, too (I never tried).
OK, that’s slightly clearer. For clarification, if my friend then uses their own domain, the process is exactly the same right, except that I use the domain instead of the subdomain?
For the rest, I feel that I actually need to learn the basics of how NGINX, reverse proxies etc work, otherwise I’m just going to be banging my head against a wall.