Jump to content

site migration 101


Jennifer S
 Share

Recommended Posts

This morning I have been trying to copy my existing PW site to a new web root, as well as up one level in hierarchy (i.e. the old site was "fypnew/processwire" but the new site should be just "fyp").

I've copied the server files to the new location, edited the root level .htaccess file to point to /fyp/ as the new RewriteBase, and confirmed that the PW database user can still access the PW database (I am not planning on migrating the database location).

I am getting the 500 error when loading the new location in my web browser. I am pretty sure the web server is reading the .htaccess file, and that it has the right permissions. I suspect I am missing some other piece of the puzzle? I am not sure how to debug from here, or what to do next, although I am looking at the PW Profile Exporter module. 

Link to comment
Share on other sites

Hmm, that all sounds okay... when you access your site you're accessing it at www.yoursite.com/fyp then according to your first sentence? If not and you're accessing it at www.yoursite.com then change the .htaccess rewritebase to just /

Other than that, I would suggest double-checking your index.php file is readable - setting permissions to 0755 should be fine.

Link to comment
Share on other sites

You still have a copy right ? Go step by step. Delete everything inside root/fyp. Install a fress PW inside root/fyp and get your .htaccess working for this fresh PW install. Save this .htaccess file. Delete everything and copy your old site to root/fyp. Now compare the old and new .htaccess files.

Link to comment
Share on other sites

Thanks for the suggestions. I installed the Profile Export module on the working site and followed its directions. I get this message during the compatibility check on the new install:

"Unable to determine if Apache mod_rewrite (required by ProcessWire) is installed. On some servers, we may not be able to detect it until your .htaccess file is place. Please click the 'check again' button at the bottom of this screen, if you haven't already."

I continued with the install and the new database was populated with my site content, but I still get 500 trying to access the site. I changed the permissions on the root index.php file to 0755, and the permissions on the .htaccess file to 644.

Link to comment
Share on other sites

I turned on debug messages and the site told me:


 


Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 7680 bytes) in /nfs/aesop02/hw21/d09/fyp/wire/core/Template.php on line 425


 


I deleted a dusty old php.ini file that had probably been sitting in the root for quite a while and now the home page renders!


 


Then I uncommented the rewriteBase line in .htaccess and made it "/fyp" and now my pages render! 


 


Now to get this working with a DNS "pretty URL" redirect. How can I tell processwire that a page can be both:


 


http://depts.washington.edu/fyp/community/


 


and


 


http://fyp.washington.edu/community


 


?

Link to comment
Share on other sites

Thank you! :)

My admin log-in didn't work after the migration so I reset it using this nifty trick:

http://processwire.com/talk/topic/490-how-to-reset-your-password-how-to-enable-the-forgot-password-function/?hl=%2Blost+%2Badmin+%2Bpassword

Now I'm re-saving my all my users' passwords. I'm wondering for the future if I did something wrong with the import or if this is a known issue concerning the "salts" not matching up.

Link to comment
Share on other sites

Now I'm re-saving my all my users' passwords. I'm wondering for the future if I did something wrong with the import or if this is a known issue concerning the "salts" not matching up.

This can happen if you have the site on a PHP 5.3+ system, and then migrate to an older PHP 5.2 system. We use blowfish hashing for much better security when we can, but only PHP 5.3+ supports it. This is one reason why we're dropping PHP 5.2 support in PW 2.4. 

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...