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

Corey Standish
Corey Standish
14,835 Points

"default wordpress Content types"

I've missed a step somewhere, i followed along with zack and when he created a new page and called it 'home' and press publish, his permalink had automatically had localhost/allisongrayce.com. Every one of my pages has 'Permalink: http://localhost/?page_id=10'. What did i not do, or select the right folder somewhere?

2 Answers

Kevin Korte
Kevin Korte
28,149 Points

You are on the wordpress's default permalink structure. On your admin dashboard, go to Settings >> Permalinks and than in the list of common settins choose the one that is "Post Name" hit the Save Changes button, go back to your website, refresh the browswer, now your home URL should be whatever the name of you site is instead of the page_id=10 crap.

If this does fail, (which it likely won't) you'll want to check that wordpress has permission to create a .htaccess file in the root, and that wordpress is able to write to that file, as selecting the Post Name permalink structure will cause Wordpress to use apache's mod_rewrite rules to rewrite the URL from the default structure you have now to a pretty URL. You also want to check that you are using an apache server for your localhost (and you likely are already).

It doesn't hurt to look at the .htaccess file before, and after, so you can see what WP is doing, and start to learn what and how mod_rewrites and .htaccess files work with apache servers.

Corey Standish
Corey Standish
14,835 Points

Thanks Kevin, i'm sorry and confused!! How do I "check that wordpress has permission to create a .htaccess file in the root", and that wordpress is able to write to that file, as selecting the Post Name permalink structure will cause Wordpress to use apache's mod_rewrite rules to rewrite the URL from the default structure you have now to a pretty URL.

Should I be re-watching previous videos that covered this somewhere?

Kevin Korte
Kevin Korte
28,149 Points

Sorry to confuse you. Before you worry about all of that, just try setting your permalinks to "Post Name" instead of "Default". 99% chance it's going to work just fine, and than you don't need to worry about it.

I didn't mean to confuse you. That may have been too much info right off the bat for you. You will eventually get to .htaccess and mod_rewrites, and you Randy goes over some of that at a nice basic level in the "Simple PHP Application" project you can also watch.

Let me know if you have any problems finding the permalink options in the settings. WP should take care of the rest.