Lance O. Posted August 20, 2020 Share Posted August 20, 2020 A new client of mine has an existing WordPress site. Because the WordPress site is so large, the client wants to migrate the site section by section into ProcessWire. So as one section in WordPress gets removed, it will be replaced by a redesigned section in ProcessWire and will keep the same urls. Can WordPress and ProcessWire coexist on same site? I'm assuming they can't coexist in the same folder on the server, but is there a way to migrate content from WordPress into ProcessWire while keeping the same urls if ProcessWire is installed in a subfolder? Once all of the WordPress content is moved into ProcessWire, then the WordPress installation will be completely removed. Looking for advice from someone who has come across the same situation. 1 Link to comment Share on other sites More sharing options...
kongondo Posted August 21, 2020 Share Posted August 21, 2020 These topics will give you some helpful hints: 8 hours ago, Lance O. said: Because the WordPress site is so large, the client wants to migrate the site section by section into ProcessWire. So as one section in WordPress gets removed, it will be replaced by a redesigned section in ProcessWire and will keep the same urls. Large in terms of assets or database? Either way, it's best to make a local copy of the WordPress site and do the migration to ProcessWire locally first. 2 Link to comment Share on other sites More sharing options...
LostKobrakai Posted August 21, 2020 Share Posted August 21, 2020 There are three parts from my perspective: Filesystem => Have wordpress and processwire in separate folders URLs => You need to find a (likely .htaccess) way to move certain paths away from wordpress to processwire Migration => How do you deal with migration needs to be clarified. Can you have downtime between taking wordpress content down and pushing the pw replacement up? How much downtime is ok? All of those are solvable problems. The complexity of the last part mostly depends on how much downtime you're allowed. The less time the more automated things need to be. 3 Link to comment Share on other sites More sharing options...
teppo Posted August 21, 2020 Share Posted August 21, 2020 11 hours ago, Lance O. said: A new client of mine has an existing WordPress site. Because the WordPress site is so large, the client wants to migrate the site section by section into ProcessWire. So as one section in WordPress gets removed, it will be replaced by a redesigned section in ProcessWire and will keep the same urls. Can WordPress and ProcessWire coexist on same site? I'm assuming they can't coexist in the same folder on the server, but is there a way to migrate content from WordPress into ProcessWire while keeping the same urls if ProcessWire is installed in a subfolder? Once all of the WordPress content is moved into ProcessWire, then the WordPress installation will be completely removed. Looking for advice from someone who has come across the same situation. I can't say that I've been in the exact same situation, but back in the days I worked on a site that was comprised of two or three separate WordPress installations (with their own individual domains behind the scenes), one section that was powered by Craft (I believe), and probably a few other bits and pieces as well. The trick there was a separate proxy service. Sure, this was intended as a long-term solution so that's somewhat different than what you're trying to do, but if these two sites need to co-exist for a notable time, some sort of proxy solution is still the approach I'd recommend looking into. I don't have an out-of-the-box solution for this, but both nginx and Apache can handle proxying specific paths: https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/ https://httpd.apache.org/docs/2.4/mod/mod_proxy.html https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html It would also be pretty simple to do this in PHP, of course — just fetch the real content with WireHttp (in ProcessWire) or wp_remote_get() (in WordPress). POST requests etc. can get a little trickier, though. That's also something you'd want to test carefully in case you decide to go on with web server level proxying ? Just for fun I did a little test using Apache mod_proxy. Probably will take this off line soon, but currently https://weekly.pw/isit/ should serve the content from isit.pw to weekly.pw ? // vhost (after enabling proxy and proxy_http apache modules) SSLProxyEngine on // .htaccess RewriteRule "^isit/(.*)$" "https://isit.pw/$1" [P] Edit: just to clarify, the solution I'm proposing here is... Separate ProcessWire and WordPress installations, with their own URLs. WP in the real domain, PW in a subdomain would likely be preferable. Installing PW in a subdirectory would result in another layer of potential complexity. Don't try to mash these up in the same directory — it's not going to work. Create new content on the ProcessWire site section (= branch) by section, and once the section is ready, proxy traffic via WP site (.htaccess, vhost, and/or PHP, depending on a few factors). Test, test, and test some more. Once everything has been proxied and no (valid) requests hit the WP site (keep track of access logs), replace the WP site with the new PW site. There are some relatively complex steps involved here, so if you're at all uncomfortable with any of it (and especially if the site is critical to the client), you should be very careful when making changes. You should also make sure that the client understands that this is a rather unconventional, and potentially risky, approach ? 5 Link to comment Share on other sites More sharing options...
Lance O. Posted August 24, 2020 Author Share Posted August 24, 2020 @teppo I appreciate your detailed response. What makes this a risky approach? @LostKobrakai I did find a way to host both WordPress and ProcessWire in the same directory: 1. I changed the WordPress index.php to index-wp.php. 2. I added the following to the ProcessWire .htaccess file (removing the WordPress .htaccess file). The directories here will use WordPress, anything else uses ProcessWire. RewriteCond %{REQUEST_URI} ^/(news|category|tag|about) RewriteRule .? index-wp.php [L] The only caveat to this is that I can't get WordPress to display as the default Home page. But maybe this is a less risky approach to using a proxy service? 1 Link to comment Share on other sites More sharing options...
teppo Posted August 27, 2020 Share Posted August 27, 2020 On 8/24/2020 at 11:26 PM, Lance O. said: @teppo I appreciate your detailed response. What makes this a risky approach? @LostKobrakai I did find a way to host both WordPress and ProcessWire in the same directory: 1. I changed the WordPress index.php to index-wp.php. 2. I added the following to the ProcessWire .htaccess file (removing the WordPress .htaccess file). The directories here will use WordPress, anything else uses ProcessWire. RewriteCond %{REQUEST_URI} ^/(news|category|tag|about) RewriteRule .? index-wp.php [L] The only caveat to this is that I can't get WordPress to display as the default Home page. But maybe this is a less risky approach to using a proxy service? What I meant was basically that there could be something unexpected that the proxy approach doesn't solve — i.e. what if some WP plugin depends on REST API and a method that the proxy doesn't pass along properly, or passes along but not with correct credentials, or something. You might also stumble upon various random paths that were not proxied but are expected by WP (or some plugin). Then again, I'd expect the same to apply to the case where both systems live in the same directory. Just be sure to test things (including back and front end, form submissions, and any possible plugins that might do "something" on the front end) carefully. Either way I think it'd be good idea to communicate to the client that the "truly clean and absolutely straightforward" approach would be setting up separate ProcessWire instance, move content over, and then publish that. A (temporary) mashup of WP and PW may indeed work as expected, but there may also be some quirks. As long as the client is OK with that, your neck is safe if something odd does eventually show up ? Link to comment Share on other sites More sharing options...
Lance O. Posted August 27, 2020 Author Share Posted August 27, 2020 @teppo Thank you! I'm going to keep an eye on the sitemap files to make sure that each path that is represented works properly. Not an ideal situation, but at least in the end the client will be on PW and not WP. 1 Link to comment Share on other sites More sharing options...
modifiedcontent Posted December 23, 2021 Share Posted December 23, 2021 You can use the API to integrate content from Processwire into Wordpress. Haven't thought this through, can provide more details later, would be messy anyway... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now