Quantcast
Channel: WordPress – Query Admin
Browsing all 26 articles
Browse latest View live

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 Article



Enable 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 Article

Display 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 Article

Lighttpd 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 Article

Secure 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 Article


Configure 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 Article

Organize 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 Article

Fixed 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 Article


WordPress 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 Article


Create 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 Article

Remove 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 Article

Remove 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 Article

Disable 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 Article


Change 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 Article

Disable 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 Article


Disable 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 Article

Update 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 Article


Update 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 Article

Constant 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 Article

Disable 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
Browsing all 26 articles
Browse latest View live




Latest Images