I am having a go with WordPress engine and customizing blog themes (thinking I am SharePoint guru god damn, I can do this silly stuff no worries!) I was particularly interested with Portfolio Theme that allows you to display gallery-like style portfolio items. I ran into the issue that I want to describe here as I did not find any straightforward and quick answer on the web. I must admit at the very beginning that this is my first day playing with WAMP/Apache/Wordpress/php so everything is new and strange to me. Maybe I am not good at using google without keywording for SharePoint, maybe my problem was too dump for finding quick answer, I don’t know… I am still puzzled that I did not find solution from first result returned from search.
I am following http://wptheming.com/2010/07/portfolio-theme/ video describing how to set theme up. One step there is to rewrite permalinks which means URLs will have nice form of: http://site/page-name and not http://site/?pageid=N. Ok, easy.
But when I completed this step, my pages were not accessible anymore with 404 error. Now, there is some info on this page:
This theme uses custom post types. If you are getting a 404 error when you try and view the portfolio posts, reset your permalinks. You can do this by going to “Settings > Permalinks” and re-saving the permalink structure.
So I did it a few times, it did not help, I googled for solution, no luck but people were reporting this problem as well. Solutions involved some hard-coding php, in files that I even could not locate… I started getting flustrated, I decided to get back to basics, googling for enabling permalinks on Apache. This is how I figured out that my brand new Apache server have module installed but not enabled by default. So I found Apache config file called httpd.config and I noticed that this line is commented out.
LoadModule rewrite_module modules/mod_rewrite.so
I uncommented it and tested if my pages work. Nope. I found that you also need to change this line from:
I restarted Apache server (I googled how to do it as well, in my case I closed WAMP and reopened it, WAMP is just like a user-friendly interface to manage Apache, PHP and MySQL, where “user-friendly” should be definitely in “” :-))
After these steps, miracle, my WordPress pages work
From now on, I promise, I will not wing on SharePoint anymore…