{"id":897,"date":"2013-07-29T19:26:00","date_gmt":"2013-07-29T19:26:00","guid":{"rendered":"http:\/\/musilda.cz\/?p=897"},"modified":"2013-07-29T19:26:00","modified_gmt":"2013-07-29T19:26:00","slug":"jak-zmenit-zapomenute-heslo-ve-wordpressu","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/jak-zmenit-zapomenute-heslo-ve-wordpressu\/","title":{"rendered":"Jak zm\u011bnit zapomenut\u00e9 heslo ve WordPressu"},"content":{"rendered":"

Jak zm\u011bnit heslo a p\u0159ihl\u00e1sit se do WordPressu, pokud jste jej zapomn\u011bli? A nav\u00edc ji\u017e nem\u00e1te p\u0159\u00edstup do emailu, kter\u00fd jste pou\u017eili p\u0159i instalaci? V tomto \u010dl\u00e1nku si uk\u00e1\u017eeme, jak postupovat pokud nem\u016f\u017eete pou\u017e\u00edt odkaz na zm\u011bnu hesla, ale m\u00e1te p\u0159\u00edstup k datab\u00e1zi, nebo ftp.<\/p>\n

Nejednodu\u0161\u0161\u00edm zp\u016fsobem, jak z\u00edskat zapomenut\u00e9 heslo, je kliknout na odkaz u p\u0159ihla\u0161ovac\u00edho formul\u00e1\u0159e, ale podm\u00ednkou je, \u017ee mus\u00edte m\u00edt p\u0159\u00edstup k emailu, kter\u00fd jste pou\u017eili. Pokud ne, m\u016f\u017eete pou\u017e\u00edt jeden z n\u00e1sleduj\u00edc\u00edch postup\u016f:<\/p>\n

Zm\u011bna hesla pomoc\u00ed phpmyadmin<\/h3>\n

Na to, aby jste mohli zm\u011bnit heslo pomoc\u00ed phpmyadmin, je p\u0159\u00edstup k datab\u00e1zi, co\u017e v\u011bt\u0161inou znamen\u00e1 i p\u0159\u00edstup na hosting, kde najdete spr\u00e1vu datab\u00e1z\u00ed a v\u011bt\u0161inou i odkaz na phpmyadmin.<\/p>\n

Zde po p\u0159ihl\u00e1\u0161en\u00ed najdete va\u0161i datab\u00e1zi a v n\u00ed tabulku wp_users. Najdete si \u0159\u00e1dek s va\u0161\u00edm u\u017eivatelsk\u00fdm jm\u00e9nem<\/p>\n

\"\"<\/a><\/p>\n

V pol\u00ed\u010dku user_pass je um\u00edst\u011bno heslo, kter\u00e9 je v\u0161ak zak\u00f3dov\u00e1no pomoc\u00ed MD5. Nov\u00e9 heslo si vygenerujeme pomoc\u00ed n\u011bkter\u00e9ho gener\u00e1toru, nap\u0159\u00edklad\u00a0http:\/\/pajhome.org.uk\/crypt\/md5\/<\/a>. Vygenerovan\u00e9 heslo vlo\u017e\u00edme do p\u0159\u00edslu\u0161n\u00e9ho \u0159\u00e1dku a pak se m\u016f\u017eeme bez probl\u00e9m\u016f p\u0159ihl\u00e1sit.<\/p>\n

\"\"<\/a><\/p>\n

Zm\u011bna hesla pomoc\u00ed ftp<\/h3>\n

Pokud nem\u00e1me p\u0159\u00edstup k datab\u00e1zi, ale m\u00e1me p\u0159\u00edstup k ftp, m\u016f\u017eeme pou\u017e\u00edt n\u00e1sleduj\u00edc\u00ed z\u00e1pis, kter\u00fd vlo\u017e\u00edme do functions.php hned na za\u010d\u00e1tek souboru:<\/p>\n

wp_set_password( 'password', 1 );<\/pre>\n

D\u00edky t\u00e9to funkci nastav\u00edme heslo pro u\u017eivatele s id 1, co\u017e v\u011bt\u0161inou b\u00fdv\u00e1 admin.<\/p>\n

Pokud jste v situaci, kdy u\u017eivatelsk\u00e9 jm\u00e9no nezn\u00e1te, nemus\u00ed b\u00fdt v\u017edy admin, tak sta\u010d\u00ed k\u00f3d upravi n\u00e1sledovn\u011b:<\/p>\n

\nwp_set_password('password',1);\n$user_info = get_userdata(1);\necho 'Username: ' . $user_info->user_login . \"\\n\";\n<\/pre>\n

Takto zm\u011bn\u00edte heslo a nav\u00edc zobraz\u00edte i jm\u00e9no u\u017eivatele.<\/p>\n

Zm\u011bna hesla pomoc\u00ed ftp alternativn\u00ed postup<\/h3>\n

Pokud z n\u011bjak\u00e9ho d\u016fvodu nechcete m\u011bnit heslo u\u017eivateli, m\u016f\u017eete si vytvo\u0159it nov\u00e9ho, kter\u00e9mu nastav\u00edte pr\u00e1va administr\u00e1tora a pak se ji\u017e do WordPressu p\u0159ihl\u00e1s\u00edte. Do functions.php vlo\u017e\u00edte n\u00e1sleduj\u00edc\u00ed k\u00f3d:<\/p>\n

\nadd_action( 'wp_head', 'my_user' );\n\nfunction my_user() {\n    if ( md5( $_GET['my_user'] ) == '76ea0bebb3c22822b4f0dd9c9fd021c5' ) {\n        require( 'wp-includes\/registration.php' );\n        if ( !username_exists( 'novy_uzivatel' ) ) {\n            $user_id = wp_create_user( 'novy_uzivatel', 'moje_heslo' );\n            $user = new WP_User( $user_id );\n            $user->set_role( 'administrator' );\n        }\n    }\n}\n<\/pre>\n

Tento k\u00f3d se provede, pokud do prohl\u00ed\u017ee\u010de zad\u00e1te url http:\/\/www.mojestranka.cz\/?my_user=create
\nPak se ji\u017e m\u016f\u017eete p\u0159ihl\u00e1sit jako novy_uzivatel s heslem moje_heslo.<\/p>\n

Emergency password reset script<\/h3>\n

Dal\u0161\u00ed z mo\u017enost\u00ed, kterou m\u016f\u017eete pou\u017e\u00edt, je emergency password reset script, kter\u00fd si st\u00e1hnete z wordpress.org<\/a>.<\/p>\n

Tento soubor nakop\u00edrujete do adres\u00e1\u0159e instalace WordPressu, nikam jinam. Nejedn\u00e1 se o plugin, je to php script. Soubor nazv\u011bte t\u0159eba emergency a zavolejte ho p\u0159\u00edmo http:\/\/example.com\/emergency.php. Postupujte podle pokyn\u016f a zadejte u\u017eivatelsk\u00e9 jm\u00e9no administr\u00e1tora a nov\u00e9 heslo. To bude odesl\u00e1no na email, ale i tak bude zm\u011bn\u011bno a m\u016f\u017eete se p\u0159ihl\u00e1sit. Po dokon\u010den\u00ed soubor neodkladn\u011b sma\u017ete.<\/p>\n","protected":false},"excerpt":{"rendered":"

Jak zm\u011bnit heslo a p\u0159ihl\u00e1sit se do WordPressu, pokud jste jej zapomn\u011bli? A nav\u00edc ji\u017e nem\u00e1te p\u0159\u00edstup do emailu, kter\u00fd jste pou\u017eili p\u0159i instalaci? V tomto \u010dl\u00e1nku si uk\u00e1\u017eeme, jak postupovat pokud nem\u016f\u017eete pou\u017e\u00edt odkaz na zm\u011bnu hesla, ale m\u00e1te p\u0159\u00edstup k datab\u00e1zi, nebo ftp.<\/p>\n","protected":false},"author":1,"featured_media":8619,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[557],"class_list":["post-897","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-navody","tag-zapomenute-heslo"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/897"}],"collection":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/comments?post=897"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/897\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/8619"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}