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 trialAmanda Valladares
1,915 PointsPage(s) and Posts not found
I uploaded my database files to a live server and the homepage is being displayed fine, but any other page or post I try to view gives me a 404 Page not found error. I used the search and replace plugin, but it's saying 0 changes have been made.
My local url has the "localhost:8888/" in it with no .com or .org after the site name. Would that be an issue? I'm not sure what to do.
7 Answers
Don Shipley
19,488 PointsThis can be very tricky sometimes depending on your hosting company... Sometimes you need to go into your phpmyadmin under wp-options and change you url. You may also need to go into your wp-config file and make changes. An easy to migrate your workpress to a live server is to use a software built for this. https://serverpress.com/
Lisa Sills
3,985 PointsI'm having the same problem... the index page is loading fine, but all other pages give me a 404 error. Ironically, the 404 page doesn't even display MY 404 page (it's the default page).
My url listed in wp-options is correct and I made the necessary changes to my config file. I'm very confused :(
Don Shipley
19,488 PointsSounds like you are having problems with your data base.. Did you do a find and replace to rename your files to your live sites name?
Lisa Sills
3,985 PointsThank you for your quick reply! Yes, once my files were uploaded to the server, I logged in to the live wordpress site admin and ran a search and replace.
Don Shipley
19,488 PointsDo you have customer support from you server? They may help you with your issue. I have never uploaded any files using serverpress however they do have an excellent customer support for uploaded your files using them.
Have not uploaded any new wordpress sites for some time but I had to go into my phpadmin changeing to wp_options renaming from http:localhost to my live server address.
The other thing I had to do is change the info in my wp-config file /** MySQL database username */ define('DB_USER', 'your_username');
/** MySQL database password */ define('DB_PASSWORD', 'your_password);
Changing the wp-config before you upload your files
Don Shipley
19,488 PointsYou may also need to change you DB_HOST depending on your live server. Mine stayed the same as localhost
Lisa Sills
3,985 PointsThank you so much for your input! I made sure the config file was current with my live database settings and the DB_HOST stayed localhost for me.
I got it to work by going into my wordpress general settings and clicking save (without changing anything); then I went to my permalink and clicked save (again, I didn't change anything). Then, I refreshed my site and it worked. I wonder if by doing a search and replace and not saving those two settings after they changed caused it to not work? I don't know, but I'll take it!
David Potts
3,864 PointsWorked well. Thank you!
Don Shipley
19,488 PointsYes after you make changes you must refresh to see the changes.. Sometime you must also go into you browser and clear your cache in order for you to view the changes..