If you’ve just installed Wordpress and activated Roots and cannot get PermaLinks, CSS or JS to work, the problem may have nothing to do with your .HTACCESS file or permalinks settings. Make sure that you have Apache mod rewrite enabled on your server. For example, on WAMP go to the systray icon for WAMP and then Apache\Apache Modules and put a check by rewrite_module.
After enabling rewrite in Apache, then go to WP-Admin/Settings/Permalinks and click save. Now test…you should be golden.
There’s always a myriad of things that can go wrong on every server or config you are using. It’s true that a good place to look is the .htaccess to make sure it updated correctly, and from there some of the key server configurations like Apache’s mod rewrite.
After some time with Roots and Wordpress in general, I can say that those two things are generally the issue, but something new always seems to pop up.
I can also say that Godaddy is a terrible host when using Roots. Their .htaccess redirects simply don’t work. I’ve set up two Wordpress installations with Roots, the redirects to assets/* work… for a few days, maybe a week, and then break. And they don’t work again afterwords. On both sites I had to remove the Roots redirects to get it to work.
it’s silly, and Godaddy support is less than useful. I had a tech helping me, he said nothing was wrong and it was our issue, then they had one of their “experts” who uses Wordpress take a look, who proceeded to try to move my WP installation around, break it, and say “they have hard links to scripts, they shouldn’t do that”. I didn’t, it was Roots redirects, which works on the vast majority of hosts except Godaddy.
Apparently I had to go on a rant, but anyways… lot’s of things that can go wrong, always helpful to throw out personal experience
TL;DR: (Ubuntu) a2enmod rewrite Edit /etc/apache2/sites-available/default and allow overrides on /var/www (2 places). Restart apache.
Long version…
I finally convinced myself to try to move away from XAMPP and set up a VM using VirtualBox, installed Ubuntu 13.04, Apache, MySQL, PHP. I clone that (linked) for a project, install WordPress in the document root (VM shared folder), activate Roots. No CSS or JS.
Oh, forgot to turn on rewrites? apache2ctl -M shows no mention of rewrites. sudo a2enmod rewrite and restart Apache. apache2ctl -M reports “rewrite_module (shared)” where there was no mention of it before. Switch to 2013, then back to Roots to be sure .htaccess updates.
That seems to be correct. And triple-checked that mod_rewrite is running, restarted the VM a couple of times, switched to 2013 and back to Roots a couple of times. Still no CSS or JS.
Wow - thanks for the details. I wouldn’t have looked at the sites-available/default folder. How many virtual servers do you have configured? Here is my sites-available/default on a working VPS - does this match up to what you have now?
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
I’m also experiencing the same problem. I’m on Windows 7 with XAMPP/Bitnami and the latest version of roots.
I enabled rewrite on Apache. I took out the # in LoadModule rewrite_module modules/mod_rewrite.so and changed all the AllowOverride None to All. Restarted Apache and updated Permalinks on WordPress and it did not work.
I also tried to implement changes on the HTACESS file after the rewrite did not fix anything and once I restarted Apache the entire file reverted back to its original state. Not sure what else to try.