ãã®èšäºã§ã¯ãWordPressã®ã»ãã¥ãªãã£ã匷åããåé¡ã«çŠç¹ãåœãŠãŠããŸãã管çããã«ãšããã°èšå®ã®äž¡æ¹ã§ããã æ¿èªåŸã«ã®ã¿è¡šç€ºãããwp-adminãã©ã«ããŒã®å å®¹å šäœãæå³ããŸãã ã æ¿èªåŸ ããšãããã¬ãŒãºãæå³çã«åŒ·èª¿ããŸãã-ããã°ãŸãã¯ãµã€ãå šäœã®ãéªæªãªããã«ãŒããšç®¡çããã«ãåããã®ã¯ãã£ã1ã€ã®ç°¡åãªãªã¯ãšã¹ãã§ããããšãæ確ã«èªèããŠãã ããã åŸè ã¯ãéžæãã匷åãªãã¹ã¯ãŒããšåããããä¿è·ãããŠããŸãã
ã¯ã©ãã«ãŒã®ã¿ã¹ã¯ãè€éã«ããå Žåããããããæåã§å®è¡ã§ããäžé£ã®æäœãæäŸããŠããŸãã ãããã®ãœãªã¥ãŒã·ã§ã³ã¯100ïŒ ã®ä¿è·ãä¿èšŒãããã®ã§ã¯ãããŸãããããã®å©ããåããŠããã°ã®ã»ãã¥ãªãã£ãå€§å¹ ã«åäžãããããšãã§ããŸãã
1. wordpressãã©ã«ããŒã®ååãå€æŽããŸãã
ããŒãžã§ã³2.6ããã wp-contentãã©ã«ããŒãžã®ãã¹ãå€æŽã§ããããã«ãªããŸããã æ®å¿µãªãããããã¯wp-adminãã©ã«ããŒã«ã¯ãŸã é©çšãããŸããã ã»ãã¥ãªãã£ãæèããããã¬ãŒã¯ããã«åæããå°æ¥ã®ããŒãžã§ã³ã§ãããå¯èœã«ãªãããšãæã¿å§ããŸããã ãããçºçãããŸã§ãåé¡ã«å¯Ÿãã次ã®ä»£æ¿ãœãªã¥ãŒã·ã§ã³ã䜿çšããããšããå§ãããŸãã WordPressãã¡ã€ã«ã§ã¢ãŒã«ã€ãã解åãããšããWordPressããã©ã«ããŒã衚瀺ãããŸãããã©ã«ããŒã®ååãå€æŽãïŒçæ³çã«ã¯ã wordpress_live_Ts6Kãã®ãããªãããã«ããååã«ïŒãã«ãŒããã£ã¬ã¯ããªã®wp-config.phpãã¡ã€ã«ãé©å®èšå®ããŸãã
ãã®å€æŽã«ããäœãåŸãããŸããïŒ
- ãŸãããã¹ãŠã®WordPressãã¡ã€ã«ããµã€ãã®ã«ãŒãã«ããä»ã®ãã¡ã€ã«ãšæ··åãããããšã¯ãªããããã«ãŒãã¬ãã«ã®æ確æ§ãé«ããŸãã
- 第äºã«ãWordPressã®è€æ°ã®ã³ããŒããçžäºäœçšãé€ããŠãç°ãªãååã®ãã©ã«ããŒã«äžŠè¡ããŠã€ã³ã¹ããŒã«ã§ããããããã¹ãã«æé©ã§ãã
- 3çªç®ã®å©ç¹ã¯ãã»ãã¥ãªãã£ã«çŽæ¥é¢ä¿ããŠããŸãã管çãŸãŒã³ïŒããã³ããã°å šäœïŒã¯ã«ãŒããã©ã«ããŒã«ååšããªãããããããã³ã°ã¢ã¯ã·ã§ã³ãå®è¡ããã«ã¯ããŸããããèŠã€ããå¿ èŠããããŸãã ããã¯äººéã«ãšã£ãŠã¯åé¡ã§ããããããã«é¢ããŠã¯æéã®åé¡ã§ãã
ã«ãŒããã£ã¬ã¯ããªã«ã€ã³ã¹ããŒã«ãããŠããããã€ãã®ããŒãžã§ã³-å¯èœã§ãïŒ
æ³šïŒ WordPressã·ã¹ãã ãã¡ã€ã«ãã«ãŒããã£ã¬ã¯ããªã«ååšãããã€ã³ã¹ããŒã«ãã©ã«ããŒã®ååãäžèšã®æšå¥šäºé ã«åŸã£ãŠå€æŽãããå Žåãããã°ã¯wp-config.ruã§åŒãç¶ãå©çšã§ããŸãã ãªãã§ïŒ ããã°ã®ãäžè¬èšå®ãã»ã¯ã·ã§ã³ã«ç§»åããäŸã«ç€ºãããã«ããWordPressã¢ãã¬ã¹ïŒURLïŒããã£ãŒã«ãã«ãµãŒããŒäžã®å®éã®ããã°ã¢ãã¬ã¹ãå ¥åããŸãã
ããã°ã®ã¢ãã¬ã¹ã¯çŸãããç®ç«ããªããã®ã§ãªããã°ãªããŸãã
ããã«ãããããã°ãçŸããä»®æ³ã¢ãã¬ã¹ã§è¡šç€ºã§ããŸãã
2. wp-config.phpãã¡ã€ã«ãæ¹åãã
WordPressæ§æãã¡ã€ã«wp-config.phpã«ã¯ãããŒã¿ããŒã¹ã«ã¢ã¯ã»ã¹ããããã®ãµã€ãèšå®ãšæ å ±ãå«ãŸããŠããŸãã ã»ãã¥ãªãã£ã«é¢é£ããä»ã®èšå®ããããŸãïŒä»¥äžã®ãªã¹ãã«è¡šç€ºãããŸãïŒã ãã®ãã¡ã€ã«ã«ãã®ãããªå€ããªãå ŽåããŸãã¯ããã©ã«ãå€ã®ã¿ãããå Žåã¯ãããã«å¿ããŠè¿œå ãŸãã¯å€æŽããå¿ èŠããããŸãã
- ã»ãã¥ãªãã£ããŒïŒããŒãžã§ã³2.7以éãWordPressã«ã¯4ã€ã®ã»ãã¥ãªãã£ããŒããããæ£ããã€ã³ã¹ããŒã«ããå¿ èŠããããŸãã WordPressã䜿çšãããšããããã®è¡ãèªåã§äœæããå¿ èŠããªããªããã»ãã¥ãªãã£ã®èŠ³ç¹ããé©åãªããŒãèªåçã«çæãããŸãã wp-config.phpãã¡ã€ã«ã®å¯Ÿå¿ããè¡ã«ããŒãæ¿å ¥ããã ãã§ãã ãããã®ããŒã¯ãããã°ã®ã»ãã¥ãªãã£ã確ä¿ããããã«å¿ èŠã§ã ã
- æ°ããã€ã³ã¹ããŒã«ãããWordPressããã°ã®ããŒãã«ãã¬ãã£ãã¯ã¹ã¯ãæšæºã®ãwp_ãã§ã¯ãªãããã¬ãã£ãã¯ã¹å€ãè€éã§ããã°ããã»ã©ãMySQLããŒã¿ããŒã¹ã®ããŒãã«ãžã®äžæ£ã¢ã¯ã»ã¹ãçºçããå¯èœæ§ã¯äœããªããŸãã æªãïŒ $ table_prefix = 'wp_'; ã ã¯ããã«è¯ãïŒ $ table_prefix = 'wp4FZ52Y_'; ãã®å€ãå¿ããªãã§ãã ãããäžåºŠå ¥åããã ãã§ãããå¿ èŠãããŸããã
- ãµãŒããŒã§SSLæå·åã䜿çšã§ããå Žå㯠ã管çãŸãŒã³ãä¿è·ããããã«SSLæå·åãæå¹ã«ããããšããå§ãããŸãã ãããè¡ãã«ã¯ãwp-config.phpãã¡ã€ã«ã«æ¬¡ã®ã³ãã³ããè¿œå ããŸããdefineïŒ 'FORCE_SSL_ADMIN'ãtrueïŒ;
æ§æãã¡ã€ã«ã®ä»ã®ã·ã¹ãã èšå®ã調æŽããããšãã§ããŸãã å©çšå¯èœãªèšå®ã®æ確ã§å æ¬çãªãªã¹ãã¯ã ã³ãŒãããŒãžã§å©çšã§ããŸãã
æ£ããã»ãã¥ãªãã£ããŒã®ã€ã³ã¹ããŒã«ãæ ããªãã§ãã ããïŒ
3. wp-config.phpãã¡ã€ã«ã移åããŸã
ãŸããããŒãžã§ã³2.6以éãWordPressã§ã¯wp-config.phpãã¡ã€ã«ãæé«ã¬ãã«ã«ç§»åã§ããŸãã ãã®ãã¡ã€ã«ã«ã¯ä»ã®ãã¡ã€ã«ãããã¯ããã«éèŠãªæ å ±ãå«ãŸããŠããããµãŒããŒã®ã«ãŒããã©ã«ããŒã«ã¢ã¯ã»ã¹ããããšã¯åžžã«éåžžã«é£ãããããä»ã®ãã¡ã€ã«ãšåããã£ã¬ã¯ããªã«ä¿åããªãæ¹ãçã«ããªã£ãŠããŸãã WortdPressã¯ã wp-config.phpãã¡ã€ã«ã®æ€çŽ¢ã§èªåçã«æäžäœãã©ã«ããŒã«ç§»åããŸã ã ãŠãŒã¶ãŒãèªåã§ãã¹ãæ§æããããšããŠããäœã®åœ¹ã«ãç«ã¡ãŸããã
4. wp-config.phpãã¡ã€ã«ãä¿è·ãã
ãã¹ãŠã®ISPãµãŒããŒã§ãã«ãŒããã£ã¬ã¯ããªãããé«ãã¬ãã«ã«ããŒã¿ã転éã§ããããã§ã¯ãããŸããã ã€ãŸãã誰ããåã®ã¹ããããå®è¡ããæš©å©ãæã£ãŠããããã§ã¯ãããŸããã ãŸãã¯ãä»ã®çç±ïŒããšãã°ãç¹å®ã®ãã©ã«ããŒæ§é ãæã€è€æ°ã®ããã°ãããå Žåããã¹ãŠã®ãã¡ã€ã«ãã«ãŒãã«é 眮ããããšã¯ã§ããŸããããã¡ã€ã«ã®ååã¯åããã°ã§äžèŽããããã§ãã ãã®å Žåã .htaccessãã¡ã€ã«ã䜿çšããŠãå€éšããwp-config.phpãã¡ã€ã«ãžã®ã¢ã¯ã»ã¹ããããã¯ã§ããŸãã ããã¯æ¬¡ã®ã³ãŒãã§ãã
[ã³ãŒã]ïŒwpconfig.phpãä¿è·
<files wp-config.php> 泚ææåŠãèš±å¯ ãã¹ãŠãæåŠ
[/ã³ãŒã]
.htaccessãã¡ã€ã«ãwp-config.phpãã¡ã€ã«ãšåããã£ã¬ã¯ããªã«ããããšã確èªããããšã¯éåžžã«éèŠã§ã ã
5.管çè ã¢ã«ãŠã³ããåé€ããŸãã
ã€ã³ã¹ããŒã«ããã»ã¹äžã«ãWordPressã¯ããã©ã«ãã®ããã¯ããŒã ãadminãã§ç®¡çè ã¢ã«ãŠã³ããäœæããŸãã äžæ¹ã§ã¯ãããã¯éåžžã«è«ççã§ãããä»æ¹ã§ã¯-æ¢ç¥ã®ããã¯ããŒã ãæã€ãŠãŒã¶ãŒãã€ãŸã 管çID-1ã¯ããã¹ã¯ãŒãæšæž¬ããã°ã©ã ã䜿çšããããã«ãŒã«ãšã£ãŠäºæž¬å¯èœãªã¿ãŒã²ããã§ãã ã¢ããã€ã¹ã¯æ¬¡ã®ãšããã§ãã
- 管çè æš©éãšããã¯ããŒã ãæã€å¥ã®ãŠãŒã¶ãŒãäœæããŸãã
- äœæ¥ã»ãã·ã§ã³ãçµäºããŸãã
- æ°ããã¢ã«ãŠã³ãã§ãã°ã€ã³ããŸãã
- 管çè ã¢ã«ãŠã³ããåé€ããŸãã
æ°ããããã°ããªãã 管çè ã¢ã«ãŠã³ãã§æçš¿ãŸãã¯ã³ã¡ã³ããæ¢ã«æçš¿ããŠããå Žåã¯ãåé€æã«ææ¡ããããªãã·ã§ã³ãããããã¹ãŠã®æçš¿ãšãªã³ã¯ããªã³ã¯ïŒããªãã·ã§ã³ãéžæããæ°ãããŠãŒã¶ãŒåãéžæããŸãã
泚ïŒçæ³çã«ã¯ã誰ãããªãã®ãŠãŒã¶ãŒåãèªèããªãããã«ãæ°ãããŠãŒã¶ãŒã®ãŠãŒã¶ãŒåãæçš¿ã«è¡šç€ºããããŠãŒã¶ãŒåãšç°ãªãããšãæãŸããã§ãã
6.匷åãªãã¹ã¯ãŒããéžæããŸãã
æœåšçãªæ»æã®ç¢ºçãšé »åºŠã¯ãããã°ã®äººæ°åºŠã«çŽæ¥äŸåããŸãã ãŸãããã®æç¹ãŸã§ã«ããµã€ãã«ã»ãã¥ãªãã£ãã§ãŒã³ã«è匱ãªãªã³ã¯ããªãããšã確èªããããšããå§ãããŸãã
ã»ãšãã©ã®å Žåããã¹ã¯ãŒãã¯ãã®ãã§ãŒã³ã®äžã§æã匱ããªã³ã¯ã§ãã ãªãã§ïŒ ã»ãšãã©ã®ãŠãŒã¶ãŒã®ãã¹ã¯ãŒããéžæããæ¹æ³ã¯ããã°ãã°ç¡é çã§äžæ³šæã§ãã å€ãã®ç 究ã¯ãã»ãšãã©ã®ãã¹ã¯ãŒãããèŠã€ããã®ãé£ãããªãå°æåã®åé³ç¯ã®æ¢åã®åèªã§ããããšã瀺ããŠããŸãã ãã¹ã¯ãŒãã¯ã©ãã«ãŒã«ã¯ãæãäžè¬çã«äœ¿çšããããã¹ã¯ãŒãã®ãªã¹ããããããŸãã
WordPressã¯ããã€ã€ã«ããããã¹ã¯ãŒãã®åŒ·åºŠã®çŽèŠ³çãªã€ã³ãžã±ãŒã¿ãŒãå®è£ ããè²ã®è€éãã®ã¬ãã«ã瀺ããŸãã
å°ãªããšã7æåã䜿çšãã å°æåãšå€§æåãçµã¿åãããŠã ïŒãªã©ã®ãµãŒãã¹æåã䜿çšããããšããå§ãããŸãã "ïŒ$ïŒ ^ïŒïŒïŒ ã
7. wp-adminãã©ã«ããŒãä¿è·ããŸãã
ã2ã€ã®é ã1ã€ãããåªããŠããããšããproveã«ç¶ããŠã管çãŸãŒã³ã®ä¿è·ã2åã«ããæ¹æ³ããããŸãã ä¿è·ã¯.htaccessãã¡ã€ã«ã«ãã£ãŠèŠå¶ãããŸãããã®ãã¡ã€ã«ã¯ããŠãŒã¶ãŒã®ãŠãŒã¶ãŒåãšãã¹ã¯ãŒããä¿åãã.htpasswdãã¡ã€ã«ãšãšãã«wp-adminãã©ã«ããŒã«é 眮ããå¿ èŠããããŸãã ãã©ã«ããŒã«ã¢ã¯ã»ã¹ããåŸããŠãŒã¶ãŒåãšãã¹ã¯ãŒããå ¥åããå¿ èŠããããŸãããéãã¯ãã®å ŽåãWordPressèªäœã§ã¯ãªããµãŒããŒåŽã§èªèšŒãå¶åŸ¡ãããããšã§ãã
.htaccessããã³.htpasswdãã¡ã€ã«ãç°¡åãã€è¿ éã«çæããã«ã¯ã ãã®ãµãŒãã¹ã䜿çšããŸã ã
8.èªèšŒããŒãžã§ã®ãšã©ãŒã®è¡šç€ºãçŠæ¢ããŸãã
WordPressã®ãã°ã€ã³ããŒãžã¯ãããã°ã®ç®¡çé åãžã®å ¥ãå£ã§ããããšã©ãŒã®ãªãæ€èšŒåŸã«å©çšå¯èœã«ãªããŸãã åãŠãŒã¶ãŒã«ã¯ç¡å¶éã®èªèšŒè©Šè¡ããããããã©ã«ãã§ã¯æ¯åã圹ç«ã€WordPressããšã©ãŒã®å 容ãæ£ç¢ºã«ç€ºããŸãã ã€ãŸããå ¥åããããã°ã€ã³ãæ£ãããªãå Žå-WordPressã¯ããèšããŸãã ããã¯ãŠãŒã¶ãŒã«ãšã£ãŠäŸ¿å©ã§ãããããã«ãŒã«ãšã£ãŠã䟿å©ã§ãã
ã·ã¹ãã ãæ£ç¢ºã«äœãééã£ãŠå ¥åãããŠãããã瀺ããšããã°ã€ã³/ãã¹ã¯ãŒãã®çµã¿åãããéžæããå¯èœæ§ãã©ãã»ã©æ©ãæžå°ããããæšæž¬ããã®ã¯ç°¡åã§ãã ç°¡åãªã³ãŒãè¡ã§ãã®åé¡ã解決ã§ããŸããããŒãã®functions.phpãã¡ã€ã«ã«è¿œå ããã ãã§ãã
[php] add_filterïŒ 'login_errors'ãcreate_functionïŒ '$ a'ã "return null;"ïŒïŒ; [/ php]
èªèšŒããŒãžã®å ã®/å€æŽãããå€èŠ³ã
9.倱æããèªèšŒè©Šè¡ã®åæ°ãå¶éããŸãã
WordPressã¯ãæåãããã©ããã«ããããããæ¿èªã®çµ±èšãä¿æããŸããã ããã¯ç®¡çè ã«ãšã£ãŠéåžžã«äžäŸ¿ã§ãããªããªãã管çè ã¯ãããé »ç¹ã«ãªã£ãå Žåã«äœããã®æªçœ®ãè¬ããäžæ£ã¢ã¯ã»ã¹ã®è©Šã¿ããã£ããã©ããã確èªããæ©äŒããªãããã§ãã ãã°ã€ã³ããã¯ããŠã³ãšãã°ã€ã³è©Šè¡å¶éãã©ã°ã€ã³ã®2ã€ã®ãœãªã¥ãŒã·ã§ã³ãæäŸããŠããŸãã ã€ã³ã¹ããŒã«åŸã圌ãã¯èªèšŒããã°ã€ã³ããã ãã§ãªããäžå®æéè©Šè¡ããŠãã人ã®IPããããã¯ããããšã«ããã倱æããèªèšŒè©Šè¡ã®åæ°ãå¶éããŸãã
10.ææ°ã®ç¶æ ã«ä¿ã¡ãŸãã
æåŸã«ãååãšããŠãWordPressã®éçºè ã¯ããšã³ãžã³ã«è匱æ§ãèŠã€ãã£ãå Žåãéåžžã«è¿ éã«å¯Ÿå¿ããŸãã ãã®ãããå¯èœãªéã調æŽããŠæŽæ°ããŠãã ããã 幞ããªããšã«ãWordPressèªäœãæ°ããããŒãžã§ã³ã®ãªãªãŒã¹ãçºè¡šããŠããŸãã ããã¯ãã©ã°ã€ã³ã«ãé©çšãããŸã-ãããã®ããŒãžã§ã³ãææ°ã®ç¶æ ã«ä¿ã¡ãŸãã
èŠããŠãããŠãã ãã ïŒã¢ããªã³ãã¢ããªã³ã«é¢ããŠã¯ãå°ãªãã»ã©è¯ãã§ãã 管çè ã¯ãæ¬åœã«å¿ èŠãªãã©ã°ã€ã³ã®ã¿ãã€ã³ã¹ããŒã«ããŠã¢ã¯ãã£ãã«ããŠããããšã確èªããå¿ èŠããããŸãã ãããã®ãã©ã°ã€ã³ã¯ãã¹ãŠãµãŒãããŒãã£ã®éçºè ã«ãã£ãŠéçºãããŠãããããåãã©ã°ã€ã³ã¯æœåšçãªãªã¹ã¯ããã³ã»ãã¥ãªãã£ãªã¹ã¯ã§ãã
ããªãã¯ã©ãã§ããïŒ
ããã°ããããã³ã°ããã©ã®ããã«ä¿è·ããŸããïŒ ããã«äœã䜿çšããŠããŸããïŒ
ã¿ããªã®ããã«WordPressãã翻蚳ïŒ