Nearly a month ago, we discussed how to quickly move a Joomla website from development to production. The process that we described in that post always worked for us – until yesterday. Here’s what we did:
- We created a fresh Joomla instance under a sub-directory called v2.
-
We migrated the old content and we ensured that the Joomla instance behaved and worked exactly as the old Joomla website.
-
We archived the old Joomla website and we moved the files and directories under the v2 folder to the old website’s location (in other words, we flipped the website).
-
We saw a blank page on the homepage!
What was very weird is that the website was fully working, with no problems whatsoever, under the v2 folder. All that we did was that we moved it up just one directory and suddenly the website is not working anymore. We checked the configuration.php file and we noticed that the paths to the tmp and the logs folder had v2 in them, so we removed it (e.g. we removed v2). This hasn’t solved the problem – we were still seeing a blank page.
Now we are very familiar with blank pages on Joomla (usually this happens when there is an issue in one of the active plugins) – but this is the first time that we see it in this scenario.
After a lot of hair pulling, teeth cringing, fingernail eating (yes – we do panic occasionally), we decided to print the included files in the index.php using the function get_included_files();. To our amazement we noticed that Joomla was trying to include some paths that had v2 in them. Huh?
We checked the files that were including the files that had v2 in their paths, but we discovered no reason for this problem. We thought, what if Apache was caching the directory structure and it still thinks that these files exist under the v2 folder. So we restarted Apache using the following commands in the shell (we were using Plesk):
/etc/init.d/httpd stop
/etc/init.d/httpd start
And what do you know? The problem was solved! The website worked normally after the restart and there were no blank pages anymore! Success!
We have no idea why Apache was doing this (probably it’s an Apache module used to speed things up) – but whatever the benefit is, we think it’s not worth it because this is a very dangerous bug feature and it doesn’t seem to be well thought of.
If you’re experiencing the same problem after migrating your Joomla website, then please try the above. If it’s a bit over your head or you just don’t have the time to do it, then please contact us. Our rates are very affordable and we’ll fix the problem on your website in no time (OK – in as little time as possible).
[…] on the new server, we got a blank page. Restarting Apache didn’t solve the problem (although it did, on other occasions), and modifying the configuration.php file to change error reporting to maximum […]