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 trialJames Whiting
39,124 PointsBlank pages? - Launching a wordpress site
Backup DB. (check) Uploaded WP files via FTP (check) Imported .sql file using phpmyadmin (check)
Went to site to view it looks great. (check) Went to site/wp-admin/ and got a white page?
Any suggestions on how to resolve this one. I cannot view the admin area.
Thanks,
Ross
4 Answers
James Whiting
39,124 PointsWhat I ended up doing is this.
- Uploading backup files to FTP.
- Created SQL DB with not tables
- Uploaded a clean config.php file
- Installed using the new config.php via browser
- Went through the .sql file and manually inserted the needed records and need new tables based on the .sql
I could not get the find and replace to work. What I learned is the wp_options table is a catch all table for the whole WP framework a lot gets tracked and stored here. Basically, every preference setting and change you make gets logged here when interacting with the admin dashboard.
Matt Campbell
9,767 PointsHave you changed the site url in the wp_options table and run replace.php?
James Whiting
39,124 PointsMatthew. I manually went in updated the wp_options table with the correct url, I am having trouble finding the replace.php script you are mentioning. FYI. I am still getting blank pages even with the wp_options siteurl field correct. Thanks for your thoughts and ideas. James
Matt Campbell
9,767 PointsOK, here's the link to replace.php for WordPress: http://interconnectit.com/products/search-and-replace-for-wordpress-databases/
When I move a site I do this:
- Upload all the FTP I need with replace.php minus wp-config.php & export database to a safe place for import later.
- Run the WordPress install creating the database.
- Drop all the tables in the database and import earlier exported local database.
- Change wp_options url to reflect domain name.
- Run www.yourdomain.com/replace.php. In the search, search for the local address and replace with live address with no forward slash. Then hit back and repeat the search with forward slash at the end of the domain. EG. www.domain.com and www.domain.com/
- Go to admin and resave permalinks.
If you'd like me to break it down further, let me know.
James Whiting
39,124 PointsThis didn't work for me, but if I understood a little better, I bet it would have. I think the above is a really nice solution for a really large WP migration. Thanks Matthew for your time and thoughts. You lead me down the path to what worked from me. There was some heavy lifting involved (see the provide answer section)
Matt Campbell
9,767 PointsMatt Campbell
9,767 PointsJames Whiting, your step 5 is basically what replace.php does. It searches the database for every instance of a domain and replaces it with your specified domain.
What was happening and happens when you upload from local is that, WordPress will work on the front end but when it goes to the database to get an url, it returns the local url and of course, that either won't work or causes an error.
What were you struggling with with replace.php?
I spent a day finding an easier solution then all that are out there. Even the codex says it's 15 steps so I was quite happy getting it down to 5 or 6. I can upload a site, excluding FTP time, in under 5 minutes.
Matt Campbell
9,767 PointsMatt Campbell
9,767 PointsI think I'll do a more broken down version of this in smaller steps as some of it can be a little confusing at first.
James Whiting
39,124 PointsJames Whiting
39,124 PointsI like the idea of the broken down version with a little more instruction. Although the way your replace.php scripts now is really quite easy. It just don't work for me when I tried it. Thanks for all your hard work on the script. A great time saver, indeed.