Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAshley Shay
8,664 PointsHelllp. Sharing local WP site with clients.
I've been trying to migrate a local site to a development subdomain for two days now... my web hosts have looked at it and told me that all the settings are right and they don't know what's wrong... except maybe that the files are getting corrupted in the upload process (they described it as the code being 'messed' in some files and just suggested I try uploading every file again.. which I did to no avail). I decided to try another route when I learned you could share your local MAMP site with others.
I tried Forward (forwardhq.com), using the plugin with Wordpress, and it seemed to all go smoothly... the terminal spit out my special url and my forward account said that the tunnel was 'open' ... but as soon as I tried to visit the URL from my computer or my phone... the terminal tells me "You are being disconnected," closes the tunnel... and I get a 502 error.
Any ideas on either how to correct this issue with Forward or another method I could use that doesn't involve uploading the site to a live server? I already delayed the client viewing the site one day... I hate to do it twice in a row. And I'd like to spend my hours actually working on the site itself. :(
5 Answers
mbukhonko
3,988 PointsWouldn't it be safer to archive the site on the local server into a tar file, upload that, check the file integrity (checksums and all), and untar it on the server then?
Ashley Shay
8,664 PointsI'll try that now, I hadn't thought of it. Stay tuned! :p
Andrew McCormick
17,730 PointsI know you said not uploading to a live server, but that truly is going to be your easiest method. I use Migrate DB Pro (http://t.deliciousbrains.com/aff_c?offer_id=2&aff_id=1084) on almost any site I develop. This allows me to have sites on my local environment, then when ready to show the client I just upload the files to a new WP install on my FTP ( i have a folder for just client WordPress sites), migrate the database with Migrate DB and vola I share that staging link with my client. Then when we are ready to go live, I do the same thing to move the DB and site files to the live server. They have a free version, but I've always used a paid subscription and just upgraded to the developer license a few months ago since I found myself using it on every site.
** Note that is an affiliate link above, but me being an affiliate has no bearing on how much I enjoy the product. And if you use SUPER20, you get 20% the best WordPress tool you'll ever buy.
Ashley Shay
8,664 PointsTrouble is, I've already done the database part of it and everything seems fine on that level... it's just the files that are giving me grief somewhere along the line. Can I use this tool without doing the whole process?
Andrew McCormick
17,730 Pointsno. unfortunately you'll still need to get your files to the server.
Ashley Shay
8,664 PointsI do still thank you for the tool, though! I will probably use it to begin with for my next project. :)
Ashley Shay
8,664 PointsSo, I've just uploaded the files (again) using the tar compression method. I haven't done this before, so forgive a silly question... but now I'm seeing files like ._wp-content ._index.php ... There's also the usual forms of these... the wp-content directory and the regular index.php file... but what's with the distorted file names?
mbukhonko
3,988 PointsAnswer I found: http://www.litfuel.net/plush/?postid=147
They're just copies that you get when you unarchive a file that was archived on a Mac. Link says to try:
tar -xzpvf mytarfile.tgz --exclude="._*"
Ashley Shay
8,664 PointsThanks! And it worked! Site is up and running now... a few things are a little wobbly, but I think they can be ironed out pretty quickly.
Got it. So I can delete these copies without fear? :)
mbukhonko
3,988 PointsI'd suggest to double-check that they ARE INDEED all copies and then delete them. That would be prudent, I think. Use the 'diff' command to compare files/directories, and make sure that if you're comparing directories you're doing so recursively.
I was also going to suggest that you calculate the checksum of the tar and verify that the integrity of the extracted files, as that would be the proper way of finding out whether data was lost along the way or corrupted, but if everything works, it should be fine. Still, it's a good habit to calculate and verify checksums.
Good luck!