Redirect WordPress Feed to FeedBurner
Edit the .htaccess file and add this text: RewriteEngine on RewriteCond %{HTTP_USER_AGENT} !FeedBurner [NC] RewriteCond %{HTTP_USER_AGENT} !FeedValidator [NC] RewriteRule ^feed/?([_0-9a-z-]+)?/?$...
View ArticleEnable or Disable All Comments on WordPress
Disable all comments: UPDATE wp_posts SET comment_status = 'closed', ping_status = 'closed'; Enable all comments: UPDATE wp_posts SET comment_status = 'open', ping_status = 'open'; The post Enable or...
View ArticleDisplay excerpt in Twenty Twelve WordPress Theme
Edit the file content.php and find this line: <?php if ( is_search() ) : // Only display Excerpts for Search ?> Change that line to: <?php if ( is_search() || is_home() || is_category() ||...
View ArticleLighttpd rewrite rules for WordPress sites
Rewrite rules compatible with WordPress permalinks: # Handle 404 errors server.error-handler-404 = "/index.php" # Rewrite rules url.rewrite-final = ( # Exclude some directories from rewriting...
View ArticleSecure WordPress with Nginx
Example of vHost config for a secured WordPress website: server { listen 80; server_name website.com; # Redirect non-www to www (website.com -> www.website.com) return 301...
View ArticleConfigure FastCGI_Cache for WordPress and Nginx
Edit the vHost file of your WordPress blog as follow: # Define cache path, size, memory name, inactive time fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=WORDPRESS:100m inactive=60m;...
View ArticleOrganize uploads folder by Post ID, Slug, Author, Media Type
Very useful code snippet that can help you to organize the uploads folder of WordPress by post_name (aka slug), post_author, post_id or media type (such as videos, images, documents, etc). This is an...
View ArticleFixed height and vertical scrollbar on SyntaxHighlighter Evolved
With SyntaxHighlighter Evolved you can post syntax-highlighted code on your site. You can set a fixed height and vertical scrollbar by adding this code: <style type="text/css"> .syntaxhighlighter...
View ArticleWordPress get Page ID outside the Loop
The recommended way to get the Page ID outside the loop is: $page_object = get_queried_object(); $page_id = get_queried_object_id(); The post WordPress get Page ID outside the Loop appeared first on...
View ArticleCreate a screenshot of a website with PHP
Using the WordPress mShot API we can generate thumbnails of websites: function capture_website_screenshot( $website, $saveas ) { $url =...
View ArticleRemove WordPress Admin Bar
Edit your functions.php file and add: add_filter('show_admin_bar', '__return_false'); The post Remove WordPress Admin Bar appeared first on Query Admin.
View ArticleRemove WordPress Emojis
If you do not plan to use the emoticons and emojis in your blog you can easily disable them by adding these lines to your functions.php file: remove_action( 'wp_head', 'print_emoji_detection_script', 7...
View ArticleDisable XML-RPC in WordPress
WordPress uses XML-RPC to remotely execute functions. For example, Jetpack and the WordPress mobile application use xmlrpc to remotely manage a WP site. However, also attackers try to exploit the...
View ArticleChange Siteurl with MySQL Queries on WordPress
To change the siteurl of your WordPress site, use these SQL queries: UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldsite.com', 'http://www.newsite.com') WHERE option_name =...
View ArticleDisable Plugin and Theme Update and Installation on WordPress
Prevents users from being able to update or install plugins and themes, plus removes the “Editor” menu so users can’t edit files. Add this line to your wp-config.php file (above the “ABSPATH” otherwise...
View ArticleDisable the Plugin and Theme Editor on WordPress
To disable only the file editor (but allow for plugins and themes installation), simply add this line to your wp-config.php file (above the “ABSPATH” otherwise it won’t work):...
View ArticleUpdate WordPress from UNIX Shell Prompt
Need to update WordPress from UNIX shell prompt? Set the current directory to the root folder of WordPress installation: cd /var/www/wpsite.com/htdocs/ Now type these commands to update WordPress to...
View ArticleUpdate a WordPress Plugin via UNIX Shell Prompt
Need to update a WordPress plugin via UNIX shell prompt? Open the /wp-content/plugins directory, example: cd /var/www/wpsite.com/htdocs/wp-content/plugins Let’s say you need to update WordPress SEO...
View ArticleConstant WP_POST_REVISIONS already defined
If you get this warning message in your WordPress website: Notice: Constant WP_POST_REVISIONS already defined in /var/www/wordpress/wp-config.php on line 95 Make sure that the definition of the...
View ArticleDisable WordPress Embeds
Some users have reported that the json URLs are sometimes indexed by Google: http://www.site.com/wp-json/oembed/1.0/embed?url=http%3A... To disable WordPress embeds you can use this plugin:...
View Article
More Pages to Explore .....