Moving wp-content outside of web root?

See Ben Word – How to Hide WordPress Summary: In the Roots Theme we’re taking several steps to help make it not so obvious that you’re using WordPress: Cleaning up the output of wp_head and removing the generator from RSS feeds Hiding /wp-content/ by rewriting static theme assets (CSS, JS, and images), rewriting the plugins … Read more

WordPress Rewrite

assuming u is a custom query var, you have to first add it to the array of recognized query vars: function wpa_query_vars( $query_vars ){ $query_vars[] = ‘u’; return $query_vars; } add_filter(‘query_vars’, ‘wpa_query_vars’); Then add an internal rewrite rule that accepts anything appended to vendors and passes that as the u query var: function wpa_rewrite(){ add_rewrite_rule( … Read more

How to attach region identifier to a pretty url?

Referencing this question I was able to resolve this issue: Need help with add_rewrite_rule To briefly display the changes I made here it goes, in my theme functions.php I added the following action: add_action(‘init’,’custom_rewrite_rule’); function custom_rewrite_rule(){ add_rewrite_rule(‘^student/([^/]*)/’,’index.php?pagename=student&country=$matches[1]’,’top’); } This above allows for my urls to be the pretty form of: {{site_url}}/student/ca/ {{site_url}}/student/us/ However this form … Read more

WordPress keeps writing rewrite rules to .htaccess

I am not sure why this happens, but you can stop all write access to your .htaccess with a simple filter: add_filter( ‘flush_rewrite_rules_hard’, ‘__return_false’ ); Neither WordPress nor any plugins calling flush_rewrite_rules() will write something into the file now. Other methods to access and change the file will still work, for example insert_with_markers().

Pages 404 in wordpress

Like Manish, I think the issue is with AllowOverride. The following is based on a Debian server. Ubuntu, if you are not aware, is based on Debian. In your apache2/ directory, you should have a sites-available/ and a sites-enabled/ directory. Disable your site with a2dissite Edit the appropriate file in sites-available/ to include the AllowOverride … Read more

How to: 301 Redirect /category/ to /customname/

Htaccess is your friend in this case. You can create 301 form your old category base to the new like so: RewriteEngine on RewriteBase / RewriteRule ^old_dir/(.*) http://www.example.com/new_dir/$1 [R=301,L] Change old_dir to category example.com to your domain and new_dir to your custom name. Hope this helps. Ohad.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)