WP Staging - DB & File Duplicator & Migration…/wp-staging/

This duplicator plugin allows you to create an staging or development environment in seconds.

It creates a file clone of your website into a subfolder of your current WordPress installation with an entire copy of your database. This sounds pretty simple and yes it is! All the hard time consumptive database and file copy stuff including url replacements is done in the background.

Nástroj pro přesun WordPressu jinam

When you’re migrating WordPress (or any other platform using serialized PHP strings in the database) between domains, you must use a safe search and replace method that preserves the integrity of the serialized string lengths. A simple of a dump file for http://localhost to, for example, is problematic because the length of the string changes but the indexes for the serialized strings does not. Consequently settings are lost and widgets disappear. Not good.

This script can now also handle multiply nested serializations, which can happen in transient values in WP at times, and it can also handle multi-byte Unicode changes safely. This is important now that internationalised domain names are allowed.

It’s worth mentioning that the code will work for any platform that stores PHP serialized arrays in a MySQL database. You can easily use this script on Drupal, Joomla and many other systems where you need to change items across a database without messing up your stored arrays.

Search & Replace DB »


How to Move WordPress to a New Server (without losing anything)…ng-anything/

Jak přesunout wordpress na novou adresu/nový hosting

Poměrně častý dotaz mezi začínajícími uživateli wordpressu je, jak ho přesunout na novou adresu či na nový hosting a přitom si zachovat všechna nastavení, články i obrázky, které byly doposud vytvořeny. Existují na to pluginy, např. Backup and Move Plugin, ale v tomto tutoriálu si ukážeme ruční cestu. Tu jsem rozdělil do pěti jednoduchých kroků.... Číst dále

Změna trvalých odkazů

Permalinks Migration…tion-plugin/…r-wordpress/

With this plugin, you can safely change your permalink structure - for example, from /%year%/%monthnum%/%da­y%/%postname%/ to /%category%/%pos­tname%/ - without breaking the old links to your website, and even doesn’t affect your search engine rankings.

But doing so will make all pages indexed by search engines become invalid, moreover, losing visitors from other sites or bookmarks that links to you.

Permalinks Migration plugin is a way to tell the search engines (and browsers) that the page has permenantly moved, and that the old address should be replaced by the new one . This plugin will generates a “301 Redirect” when user or spider visit your site through old permalinks and redirect them to the new permalinks of the same post.

Zálohování a obnova

UpdraftPlus Backup and Restoration…updraftplus/

Simplifies backups (and restoration). Backup into the cloud (Amazon S3 (or compatible), Dropbox, Google Drive, Rackspace Cloud, DreamObjects, FTP, SFTP, SCP, WebDAV, OpenStack Swift and email) and restore with a single click. Backups of files and database can have separate schedules.

UpdraftPlus is the highest-ranking backup plugin on (ranks in the top 40 out of 30,000 WordPress plugins for quality on - last checked 21 September 2014).

Widely tested and reliable (over 1.8 million downloads). Ranks in the top 100 most used of all WordPress plugins on Millions of backups completed!


XCloner - Backup and Restore…and-restore/

XCloner is a Backup and Restore component designed for PHP/Mysql websites, it can work as a native plugin for WordPress and Joomla!.

XCloner design was specifically created to Generate custom backups of any LAMP website through custom admin inputs, and to be able to Restore the clone on any other location with the help of the automatic Restore script we provide, independent from the main package!

XCloner Backup tool uses Open Source standards like TAR and Mysql formats so you can rest assured your backups can be restored in a variety of ways, giving you more flexibility and full control.

XCloner Generate, Move and Restore process:

  1. Generate and Store the backups
  2. Move the backup and restore script to the new location
  3. Restore the backup by launching the XCloner.php restore script


The Duplicator plugin is designed to give WordPress Administrators the ability to migrate a site from one location to another location in 3 easy steps. Just create a package, download it and install. No need to change all your settings and re-run import/export scripts. The plugin also serves as a simple backup utility. This tool is great for pulling a production site down onto your local machine for testing and validation. It also works great for developing locally and then pushing up to a production server.

It reduces the process to three easy steps:

  1. Create a package
  2. Download
  3. Install in the new location

EZPZ One Click Backup…lick-backup/

EZPZ One Click Backup is a very easy way to do a complete backup and restoring of your entire WordPress site. In fact it's so easy to use there are no required user settings, everything is automatic. Just one click and presto, you'll have a complete backup stored on your server. One more click and you can download the entire backup to your own computer.

If you prefer to download your backup via FTP the path you'll need is also included. EZPZ OCB also stores your last backup on the server in case you ever need to download it again.

With the new EZPZ Easy Restore restoring your site is a simple two step process.


Simple automated backups of your WordPress powered website. BackUpWordPress will back up your entire site including your database and all your files.

WordPress Database Backup…p-db-backup/

(Pouze) databázi lze zazálohovat manuálně uložením na server, vlastní počítač nebo posláním na email, ev. automaticky ve zvoleném intervalu.


Backup, restore, migrate your WP installation, both code and MySQL tables, with a single click.

WP Staging - DB & File Duplicator & Migration…/wp-staging/

This duplicator plugin allows you to create an staging or development environment in seconds. It creates a file clone of your website into a subfolder of your current WordPress installation with an entire copy of your database. This sounds pretty simple and yes it is! All the hard time consumptive database and file copy stuff including url replacements is done in the background. For testing new plugins and updates first before installing them on live website.

SQL dotazy k nezaplacení

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

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

UPDATE wp_posts SET post_content = REPLACE(post_content, '', '');
UPDATE wp_posts SET guid = REPLACE(guid, '', '');
UPDATE wp_options SET option_value = REPLACE(option_value, '', '');
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, '', '');

Tento způsob ale bohužel neřeší případ tzv. serializovaných dat. 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ř.:…lace-domain/,…s-databases/

nebo pluginy WP Migrate DB či 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

UPDATE wp_posts SET post_content =
concat(post_content, ' ...') WHERE post_type = 'post';

nebo hromadně nahradit url uvedené komentátorem

UPDATE wp_comments
SET comment_author_url =
REPLACE( comment_author_url, '', '');

Změna hesla

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

UPDATE wp_posts
SET post_author=NEW_AUTHOR_ID
WHERE post_author=OLD_AUTHOR_ID;

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

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

DELETE from wp_comments WHERE comment_approved = '0';

Nalezení nevyužitých tagů

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ů

SELECT DISTINCT comment_author_email
FROM wp_comments;

Vymazání všech tagů u příspěvků najednou

DELETE a,b,c
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ů

SELECT * FROM wp_postmeta pm
LEFT JOIN wp_posts wp ON wp.ID = pm.post_id

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

UPDATE wp_posts SET comment_status = 'closed'
WHERE post_date < '2009-01-01' AND post_status = 'publish';

Deaktivace všech pluginů

UPDATE wp_options SET option_value = '' WHERE option_name = 'active_plugins';


Relativní cesta k obrázkům

Když jsem přesunovala jeden web na jinou doménu, setkala jsem se v podstatě s jedinou větší nepříjemností, a tou byly URL adresy vložených obrázků. Ve WordPressu se do příspěvků vkládají absolutně, což pak je nutné změnit buď příspěvek po příspěvku, nebo jakž takž v zálohované databázi. Ani jedno z toho není nejlepší cesta. Zatím neznám [...]

Jak přesunout WordPress na jiný hosting

V poslední době narážím často na nešťastné uživatele, kteří by rádi přesunuli svůj fungující WordPress na jiný hosting a neví jak na to. Vzhledem k tomu, že nyní přesouvám hned několik webů, ulehčím vám trošku práce. Pří přesouvání WordPressu mohou nastat dvě varianty:

Přesouváte WordPress z hostingu na jiný hosting a zachováváte si svojí doménu, tzn. z [...]