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 trial

WordPress

Blank 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

What I ended up doing is this.

  1. Uploading backup files to FTP.
  2. Created SQL DB with not tables
  3. Uploaded a clean config.php file
  4. Installed using the new config.php via browser
  5. 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
Matt Campbell
9,767 Points

James 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
Matt Campbell
9,767 Points

I 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.

I 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.

Matt Campbell
Matt Campbell
9,767 Points

Have you changed the site url in the wp_options table and run replace.php?

Matthew. 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
Matt Campbell
9,767 Points

OK, 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:

  1. Upload all the FTP I need with replace.php minus wp-config.php & export database to a safe place for import later.
  2. Run the WordPress install creating the database.
  3. Drop all the tables in the database and import earlier exported local database.
  4. Change wp_options url to reflect domain name.
  5. 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/
  6. Go to admin and resave permalinks.

If you'd like me to break it down further, let me know.

This 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)