Moving admin folder to sub domain

I have a problem with Cloudflare and his 100-second timeout. I have come on the idea if I move admin area to a subdomain and exclude subdomain from Cloudflare I will pass that 100-sec timeout. The problem is when I importing or refreshing stock of suppliers products this take more than 100 seconds and I need to manually pause my site on Cloudflare for that time. Is that even possible? If someone has that experience it would be nice t know. I use woocommerce on this site.
Kind regards.
David

  • Adam Czajczyk
    • Support Gorilla

    Hello David

    I hope you're well today!

    In theory, that might be possible but I must say I've never seen it "live" and don't know anyone using such solution. But, again in theory, it could work. Take a look here please:

    https://codex.wordpress.org/Administration_Over_SSL#Further_Information

    This is slightly different case but the solution could be similar. You should probably ignore the "non-SSL/SSL" there and use everything over SSL but other than with the rewrites suggested there that should work even if you'd use sub-domain.

    Please note though: I don't have any experience with this as I never tried to set something like that and never seen it on any site, it's possible that some additional adjustments might be necessary or some additional issues may happen so I'd strongly suggest trying that with some staging/dev/test site first.

    Best regards,
    Adam

  • David
    • Site Builder, Child of Zeus

    Hi Adam, this sim very complicated.
    But basically with cpanel should be more simple in theory.
    Also, that tutorial is very old and opens many security questions for me.

    Kind regard and thank you for the response.
    David

  • Adam Czajczyk
    • Support Gorilla

    HI David

    Yeah, this tutorial is quite old but it's "official" WP document from WordPress Codex, I'd consider it still valide.

    But yes, it does seems complex. It might be easier to try via cPanel but while you could just set a sub-domain there with a root folder pointing to /wp-admin (that would be fine) I think you'd still need to take care of those all redirects/rewrites and that's not something you can replace via aliases/forwards from cPanel I think.

    Best regards,
    Adam

  • Adam Czajczyk
    • Support Gorilla

    Hi David

    Hm... I read that and I'm not really convinced. It's suggested there to edit core WP files and this is something that should never ever be done:

    - it can cause a whole bunch of totally unexpected issues that will be incredibly difficult to track then (and probably solve too)
    - all the changes will be lost upon WP update
    - what works now might stop working or even break the site if re-applied after some future updates.

    Basically, if you're about to edit WP core files, you might as well fork WP core and start your own separate development branch, with all the consequences of that... So the long story short is: if it requires changes in core code, in my opinion it's a "no go" area and shouldn't be considered a solution.

    Taking that all into account it might be much better to actually go for some custom coding based on CloudFlare API to be able to easily pause it and start back. Pause/Start seems to be quite an easy thing to do via the API so with a bit more effort you could probably be able to "automate" that - "hook" it up via some action/filter to whatever code/plugin is doing that "stock of suppliers products import or refresh"

    https://community.cloudflare.com/t/how-do-i-pause-and-start-again-cloudflare-through-the-api/27412/2

    The CloudFlare API can also be used to clear up CloudFlare cache so that together could make much better solution, in my opinion, than doing any modifications to WordPress core :slight_smile:

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.