Why does chrome keep downloading a file instead of running the site?

What I do On receipt of WordPress files and Db install in my localhost directory (I use EasyPHP Dev server) I then install Db and change wp-config.php to connect to local db etc. Then copy .htacces to htaccess.back Edit .htaccess to point at local dir structure (in this case find “~porterp6” and replace with “wordpress2” … Read more

Permalinks not working Apache + CentOS 7

For the next person, be sure to set AllowOverride All in the correct directory. In Damon’s case he set AllowOverride All in the /var/www/html directory, but his site is located in /var/www/example.com/public_html. I could be wrong, but the AllowOverride setting is specific to the directory. Damon should add the AllowOverride All setting to the /etc/httpd/sites-available/example.com.conf … Read more

CSS not loaded when omitting www. part of URL

This can happen for several reasons – in your case, it looks like you are using a caching plugin that only recognizes www links. I suspect if you turned off caching you would not have that problem, but then you’d lose the benefits of caching. It’s best practice (with or without caching) to add redirects … Read more

CPT Post Title Permalink: Replace “@” (or all special characters) with dash “-” instead of just removing

Just make sure your filter runs before the one that WordPress itself applies – add a priority of 9: add_filter( ‘sanitize_title’, function( $title ) { if ( FALSE !== strpos( $title, ‘@’ ) ) { $title = str_replace( ‘@’, ‘-‘, $title ); } return $title; }, 9 ); Usage: echo sanitize_title( ‘[email protected]’ ); Output: mytitle-example-org