Nastavení počtu revizí a smazání revizí příspěvků

**Delete-Revision**
„http://wordpress.org/extend/plugins/delete-revision/“:http://wordpress.org/extend/plugins/delete-revision/

V *Nastavení > Delete-Revision > Check Redundant Revision* pak lze vymazat zbytečné revize.

**Revision Control**
„http://wordpress.org/extend/plugins/revision-control“:http://wordpress.org/extend/plugins/revision-control

**Optimize Database after Deleting Revisions**
„http://wordpress.org/plugins/rvg-optimize-database/“:http://wordpress.org/plugins/rvg-optimize-database/

One Click WordPress Database Cleaner / Optimizer.

**Řešení bez použití pluginů:**

v souboru wp-config.php možno nastavit
/—code php
// vypne revize
define(‚WP_POST_REVISIONS‘, false );

// ukládá jen definovaný počet revizí
define(‚WP_POST_REVISIONS‘, 2);

// nastaví interval ukládání ve vteřinách
define(‚AUTOSAVE_INTERVAL‘, 60 );
\—

**PHP skript pro hromadné smazání všech revizí :**

/—code php

\—

**Ev. v Myadminu jen SQL příkazem :**

/—code php
DELETE FROM wp_posts WHERE post_type=’revision‘
\—

Správa databáze

**WP-DBManager**
„http://wordpress.org/extend/plugins/wp-dbmanager/“:http://wordpress.org/extend/plugins/wp-dbmanager/
„http://lesterchan.net/portfolio/programming/php/#wp-dbmanager“:http://lesterchan.net/portfolio/programming/php/#wp-dbmanager

Allows you to optimize database, repair database, backup database, restore database, delete backup database , drop/empty tables and run selected queries. Supports automatic scheduling of backing up and optimizing of database.

Kontaktní formulář, formulářové pluginy

**Contact Form 7**
„http://wordpress.org/extend/plugins/contact-form-7/“:http://wordpress.org/extend/plugins/contact-form-7/
„http://contactform7.com/“:http://contactform7.com/

Contact Form 7 can manage multiple contact forms, plus you can customize the form and the mail contents flexibly with simple markup. The form supports Ajax-powered submitting, CAPTCHA, control question, Akismet spam filtering and so on.
Můžete založit třeba sto různých formulářů se stovkou různých obsahů. Takže například jeden bude obsahovat textová pole a rozjížděcí menu, jiný zase check buttony a potvrzovací tlačítka nebo všechno dohromady. Uděláte si takový formulář, jaký budete chtít. Čeština k dispozici.

„Optimize and style Contact Form 7“:http://wpstorm.net/2009/06/optimize-style-contact-form-7-wordpress/

„How To Customize The Style Of Contact Form 7 To Match Your Website »“:https://www.elegantthemes.com/blog/tips-tricks/how-to-customize-the-style-of-contact-form-7-to-match-your-website

„Stylování Contact Form 7 do podoby ElegantThemes Contact Form »“:http://www.agentwp.com/style-contact-form-7-form-like-elegantthemes-contact-form

„Přidání funkcí onfocus a onblur“:http://www.sramekdesign.com/wordpress/hacking-contact-form-7-add-onfocus-and-onblur-function/

**Contact Form 7 to Database Extension**
„http://wordpress.org/extend/plugins/contact-form-7-to-database-extension/“:http://wordpress.org/extend/plugins/contact-form-7-to-database-extension/

„Changing Form Data Before it is Saved »“:http://cfdbplugin.com/?page_id=747

Saves form submissions to the database that come from Contact Form 7.

*Alternative*

**Save Contact Form 7**
„https://wordpress.org/plugins/save-contact-form-7/“:https://wordpress.org/plugins/save-contact-form-7/

Save Contact Form 7 data. Sort, search & export it in CSV+PDF. Unlike CFDB, the plugin itself is very smart and creates column name from your Contact Form 7 Field names.

**Jquery Validation For Contact Form 7**
„https://wordpress.org/plugins/jquery-validation-for-contact-form-7/“:https://wordpress.org/plugins/jquery-validation-for-contact-form-7/

This plugin adds jquery validation to your contact form 7. You will be able to validate extra validation rules like: url, date, credit card, phone number in the contact form 7 fields.

**Frontend Registration – Contact Form 7**

Frontend Registration – Contact Form 7

By using this plugin you can create front-end registration form by which registered user will be register as a subscriber role in WordPress.

**Contact Form 7 MailChimp Extension**
„https://wordpress.org/plugins/contact-form-7-mailchimp-extension/“:https://wordpress.org/plugins/contact-form-7-mailchimp-extension/
Simple way to integrate MailChimp mailing lists to Contact Form 7. Save your subscribers in a proper mailing list.

**Contact Form 7 – Success Page Redirects**
„https://wordpress.org/plugins/contact-form-7-success-page-redirects/“:https://wordpress.org/plugins/contact-form-7-success-page-redirects/
An add-on for Contact Form 7 that provides a straightforward method to redirect visitors to success pages or thank you pages.

**Contact Form 7 Modules**
„http://wordpress.org/plugins/contact-form-7-modules/“:http://wordpress.org/plugins/contact-form-7-modules/
Add useful modules such as hidden fields and „send all fields“ to the Contact Form 7 plugin. You can also choose to have the value of the hidden field dynamically populated in your form when you are contacted.

**Contact Form 7 Select Box Editor Button**
„https://wordpress.org/plugins/contact-form-7-select-box-editor-button/screenshots/“:https://wordpress.org/plugins/contact-form-7-select-box-editor-button/screenshots/
Add a contact form link into article text. For contact forms where the recipient can be chosen in a select box.

**Contact Form 7 Dynamic Text Extension**
„http://wordpress.org/plugins/contact-form-7-dynamic-text-extension/“:http://wordpress.org/plugins/contact-form-7-dynamic-text-extension/

CF7 DTX lets you create pre-populated fields based on other values. Some examples might include:

– Auto-filling a URL
– Auto-filling a Post ID, title, or slug
– Pre-populating a Product Number
– Referencing other content on the site
– Populating with post info
– Populating with user info
– Populating with custom fields
– Any value you can write a shortcode for

You can also choose to have the value of the hidden field dynamically populated in your form when you are contacted.

„Další nastavení (Bcc:, Google Analytics) »“:http://ideasilo.wordpress.com/2009/05/31/contact-form-7-1-10/

„Manipulace s údaji v Contact Form 7 před a po odeslání »“:https://wordpresso.ovx.cz/manipulace-s-udaji-v-contact-form-7-pred-a-po-odeslani/

„Honeypot Module for Contact Form 7 WordPress Plugin »“:https://wordpress.org/plugins/contact-form-7-honeypot/

„Fórum podpory »“:http://wordpress.org/support/plugin/contact-form-7

„Configuring Contact Form 7 to Work Perfectly With a Twentyten Child Theme »“:http://voodoopress.com/configuring-contact-form-7-to-work-perfectly-with-a-twentyten-child-theme/

„Když máte problém s odesíláním »“:http://buzztone.com.au/contact-form-7-email-issues/
„Další rady, co dělat při selhání »“:http://angstrey.com/index.php/2009/07/20/contact-form-7s-failed-to-send-your-message-error/

„FAQ »“:http://contactform7.com/faq/

*Alternativy:*

**Caldera Forms – Drag and drop responsive WordPress form builder**
„https://wordpress.org/plugins/caldera-forms/“:https://wordpress.org/plugins/caldera-forms/

Caldera Forms‘ visual editor simplifies form building for WordPress. Set up your form with multiple columns, add additional pages, and funnel user responses with conditional logic to get more robust data and relevant information from your customers and site visitors. Anti-spam, AJAX, notification emails, and database entry tracking are enabled by default.

*Visual Form Builder*
„https://wordpress.org/plugins/visual-form-builder/“:https://wordpress.org/plugins/visual-form-builder/

A plugin that allows you to build and manage all kinds of forms for your website in a single place. Drag-and-drop reordering, automatically stores form entries in your WordPress database, manage form entries in the WordPress dashboard, export entries to a CSV file, send form submissions to multiple emails, jQuery Form Validation.

**Intouch**
„http://wordpress.org/extend/plugins/intouch/“:http://wordpress.org/extend/plugins/intouch/
„http://adahas.com/work/intouch/“:http://adahas.com/work/intouch/

This is a plugin for WordPress which allows you to insert a custom build contact form, which on submission will send the information via email.
Features
* Customizable contact form with variable number of fields.
* Ability to specify mandatory fields.
* Can forwarded to any email address.
* Instant insertion using the Quicktag.
* Complete customization from admin panel.
* Instant submission using AJAX (for JavaScript supported browsers), and minimum overhead.
* Fall-back to standard HTML form submission, if JavaScript is not supported.
* Conforms to XHTML 1.0 Strict / XHTML 1.1
* Compatible to be served as application/xhtml+xml

**cforms II**
„http://www.deliciousdays.com/cforms-plugin“:http://www.deliciousdays.com/cforms-plugin

cforms is a plugin for WordPress, offering convenient deployment of multiple contact forms throughout your blog or even on the same page. The form submission utilizes AJAX, falls back, however, to a standard method in case AJAX/Javascript is not supported or disabled.

**Fast Secure Contact Form**
„http://wordpress.org/extend/plugins/si-contact-form/“:http://wordpress.org/extend/plugins/si-contact-form/

This plugin allows a webmaster to easily create and add contact forms to WordPress. The contact form will let the user send emails to a site’s admin, and also send a meeting request to talk over phone or video. An administration panel is present, where the webmaster can create and preview unlimited forms.

Features a super easy admin panel, multi-form feature, autoresponder, no templates to mess with, and an option to redirect visitors to any URL after the message is sent. Includes CAPTCHA and Akismet support to block all common spammer tactics. Spam is no longer a problem. You can add extra fields of any type: text, textarea, checkbox, checkbox-multiple, radio, select, select-multiple, attachment, date, time, hidden, password, and fieldset.

**Formidable Forms**
„http://wordpress.org/plugins/formidable/“:http://wordpress.org/plugins/formidable/

Quickly and easily build forms with a simple drag-and-drop interface and in-place editing. There are dozens of form-building plugins out there to create forms, but most are confusing and overly complicated. With Formidable, it is easy to create forms within a simple drag-and-drop interface.

„Přehled pluginů pro kontaktní formuláře »“:http://www.tripwiremagazine.com/2011/02/10-awesome-up-to-date-wordpress-plugins-to-build-contact-forms-fast.html

SQL dotazy k nezaplacení

**Náhrada jednoho řetězce za druhý v libovolné tabulce a poli**

/—code php
UPDATE table_name
SET field_name = replace( field_name, ‚tohle_najdi‘, ‚timhle_nahrad‘ );
\—

k nezaplacení např. při přesunu webu na jinou adresu, lze tak nahradit absolutní URL obrázků, siteurl-homeurl nebo guide

/—code php

UPDATE wp_posts SET post_content = REPLACE(post_content, ‚http://stara.cz‘, ‚http://nova.cz‘);
UPDATE wp_posts SET guid = REPLACE(guid, ‚http://stara.cz‘, ‚http://nova.cz‘);
UPDATE wp_options SET option_value = REPLACE(option_value, ‚http://stara.cz‘, ‚http://nova.cz‘);
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, ‚http://stara.cz‘, ‚http://nova.cz‘);
\—

Tento způsob ale bohužel neřeší případ tzv. „serializovaných dat“:http://stackoverflow.com/questions/11817950/what-is-data-serialization. Při migraci WP na jiné url je proto jistější použít nějaký specializovaný nástroj pro náhradu v serializovaných datech, např.:

„http://pixelentity.com/wordpress-search-replace-domain/“:http://pixelentity.com/wordpress-search-replace-domain/,

„https://interconnectit.com/products/search-and-replace-for-wordpress-databases/“:https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

nebo pluginy „WP Migrate DB“:https://wordpress.org/plugins/wp-migrate-db/ či „Better Search Replace“:https://wordpress.org/plugins/better-search-replace/.

WP Migrate DB migrates your database by running find & replace on URLs and file paths, handling serialized data, and saving an SQL file.

Někdy je potřeba jen přidat text na konec obsahového pole

/—code php
UPDATE wp_posts SET post_content =
concat(post_content, ‚ …‘) WHERE post_type = ‚post‘;
\—

nebo hromadně nahradit url uvedené komentátorem

/—code php
UPDATE wp_comments
SET comment_author_url =
REPLACE( comment_author_url, ‚http://www.stara.cz‘, ‚http://www.nova.cz‘);
\—

**Změna hesla**

/—code php
UPDATE ‚wp_users‘
SET ‚user_pass‘ = MD5(‚PASSWORD‘) WHERE ‚user_login‘ =’admin‘ LIMIT 1;
\—

**Přesun příspěvků z jednoho autora na jiného**

/—code php
UPDATE wp_posts
SET post_author=NEW_AUTHOR_ID
WHERE post_author=OLD_AUTHOR_ID;
\—

**Vymazání revizí a souvisejících metainformací**

/—code php
DELETE a,b,c FROM wp_posts a
WHERE a.post_type = ‚revision‘
LEFT JOIN wp_term_relationships b
ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id);
\—

**Dávkové vymazání komentářů označených jako spam**

/—code php
DELETE from wp_comments WHERE comment_approved = ‚0‘;
\—

**Nalezení nevyužitých tagů**

/—code php
SELECT * From wp_terms wt
INNER JOIN wp_term_taxonomy wtt ON wt.term_id=wtt.term_id
WHERE wtt.taxonomy=’post_tag‘ AND wtt.count=0;
\—

Výpis e-mailů vašich komentátorů
/—code php
SELECT DISTINCT comment_author_email
FROM wp_comments;
\—

**Vymazání všech tagů u příspěvků najednou**
/—code php
DELETE a,b,c
FROM
database.prefix_terms AS a
LEFT JOIN database.prefix_term_taxonomy AS c ON a.term_id = c.term_id
LEFT JOIN database.prefix_term_relationships AS b
ON b.term_taxonomy_id = c.term_taxonomy_id
WHERE (c.taxonomy = ‚post_tag‘ AND c.count = 0);
\—

**Výpis všech nepotřebných *post meta* záznamů**

/—code php
SELECT * FROM wp_postmeta pm
LEFT JOIN wp_posts wp ON wp.ID = pm.post_id
WHERE wp.ID IS NULL;
\—

**Hromadné vypnutí komentářů u starších příspěvků**

/—code php
UPDATE wp_posts SET comment_status = ‚closed‘
WHERE post_date < ‚2009-01-01‘ AND post_status = ‚publish‘;
\—

**Deaktivace všech pluginů**

/—code php
UPDATE wp_options SET option_value = “ WHERE option_name = ‚active_plugins‘;
\—

**Zdroj:**

„http://www.catswhocode.com/blog/wordpress-10-life-saving-sql-queries“:http://www.catswhocode.com/blog/wordpress-10-life-saving-sql-queries

„http://www.onextrapixel.com/2010/01/30/13-useful-wordpress-sql-queries-you-wish-you-knew-earlier/“:http://www.onextrapixel.com/2010/01/30/13-useful-wordpress-sql-queries-you-wish-you-knew-earlier/

Vkládání a náhrada bloků dat – textu, PHP kódu, databáze

**Sniplets**
„http://wordpress.org/extend/plugins/sniplets/“:http://wordpress.org/extend/plugins/sniplets/
„http://urbangiraffe.com/plugins/sniplets/“:http://urbangiraffe.com/plugins/sniplets/

Sniplets is a generic text insertion plugin with support for an extensible processing framework. At it’s simplest this means you can dynamically replace text in your posts with text that may be defined elsewhere, or created by some other module. For example, you can use Sniplets to perform syntax highlighting of files, execute custom PHP code, insert data from a database, and perform all manner of other useful tasks within a standard interface. On top of this, Sniplets can be automatically inserted at key points on a page. For example, you can automatically insert text on every RSS post.

– Replace tags in a post with pre-defined text
– Customizable placement points and templates
– Apply processing modules to the pre-defined text to perform additional functionality
– Automatically insert Sniplets in key points of a page (before post, after post, more tag, header, footer, comment form, sidebar, and initialization)
– Apply pre-defined templates to Sniplets
– Includes a Sidebar Widget to allow Sniplets in the sidebar
– Custom modules can be written by the user
– Fully localized

Změna defaultního wp_ prefixu tabulek

**Table Prefix Rename**
„http://www.seoegghead.com/software/wordpress-table-rename.seo“:http://www.seoegghead.com/software/wordpress-table-rename.seo

This WordPress plugin facilitates renaming all WordPress tables with a custom prefix. Why do that?

Well, it turns out that the majority of exploits we’ve seen against WordPress-based web sites (this one and those for clients) have a very simple signature — they attempt SQL injection attacks with the assumption that the table prefix is set to „wp_.“ So why not just change the prefix?

Now this is nothing new, and other people have written it up or made plugins. But they require that one make the changes manually and/or live. Our version does the following in 2 easy steps with a button-click for each:

1. Creates a duplicate set of tables with the same structure/schema.
1a. Copies a coherent version of the old tables to the new tables.
1b. Makes a few changes to the data in the new tables with regard to the new table names.
(all the while showing all executed queries to keep you informed).

2. Swaps to the newly-created set of tables.

GD Press Tools

**GD Press Tools**
„http://wordpress.org/extend/plugins/gd-press-tools/“:http://wordpress.org/extend/plugins/gd-press-tools/
„http://info.dev4press.com/gd-press-tools/features.html“:http://info.dev4press.com/gd-press-tools/features.html

GD Press Tools is a collection of various administration, seo, maintenance, backup and security related tools. This tools can be integrated into the various WordPress admin panels, can perform maintenance operations, change some aspects of WordPress, see detailed server settings and information. Plugin can also track posts and pages views for various popularity lists.