Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Installation complete, merging of WP to self hosted site complete, but will not let me login as .com/wp-admin/? Why?
I successfully installed & merged Wordpress last night and went to login this morning to the "websitename.com/wp-admin/" and it rerouted me to "websitename.wordpress.com/wp-admin", so I logged into that to see what's going on, and I don't really have access to the self hosted one because when I click on it, a screen pops up about how it's not safe, etc. I don't know what to do, but I want to start working on the self hosted one. Is it because the wordpress hosted one is still active that it's not working properly?
Chris Shaw26,662 Points
The reason this is happening is because WordPress stores your website address statically within the database so that images, theme paths etc. link correctly, to fix this you will need to download the search and replace tool linked below which deserializes the database objects and updates strings based on the input you give it.
Before using this tool I would recommend you make a backup of your current database, once you have that do the following.
Download the Search and Replace script.
Upload the Search-Replace-DB-master folder to the root folder (the same folder wp-config.php lives in) on your server.
Visit websitename.com/Search-Replace-DB-master in your browser.
In the replace field use the domain for your WordPress.com hosted site: websitename.wordpress.com.
In the with field use your self hosted domain: websitename.com.
Hit the Live Run button and in the results panel you should see a lot of changes occurring.
Visit websitename.com/wp-admin again and this time you shouldn't be redirected.
Let me know if any of that is confusing or if you have issues.
PLEASE NOTE: Once you're done with this script you SHOULD remove it from your server as it does pull in your database authentication details automatically.