February 6, 2007 at 2:18 am · Filed under Wordpress, WorldWideWoops
호스팅을 옮기면서 잠깐 고민하다 결국 WP를 다시 깔았는데…
나는 WP가 싫다.
테마와 플러그인의 dependency를 관리하지 못해 매우 복잡한 이전 절차를 거쳐야 하고…
빨라졌다고는 하나, Static Build의 효율성을 이길 수 없으며,
게다가 테마에 박혀있는 태그들은 잘도 이런걸 가지고 테마를 만드는구나 하는 생각.
이게 테마야? 프로그래밍이지…
테마 템플릿들은 모두 자기 멋대로 만들어 개념도 의미도 없고… 스파게티.
설치된 코드들은 역겹다. 손대고 싶은 생각도 별로 안든다.
어째서! MovableType이 더 깔끔하고 쉬운데도 왜 WordPress가 대세란 말인가! 단지 Perl과 PHP의 차이?
투덜투덜대면서도 결국 사용하긴 하지만… 에이.
밤새서 작업해야 하는데 두시간동안 쓸데없이 WP Config에 바쳤네. 공연한 화풀이려나.
July 31, 2006 at 2:11 pm · Filed under WebDevelopment, Wordpress
- Wordpress 2.0.4 기준 -
워드프레스를 국내 웹호스팅에서 사용하려다 보면 가끔 모든 설정이 정상(?)으로 되어있음에도 한글이 깨지는 경우를 볼 수 있다.
이는, 제로보드(zb5말고, 이전버전)때문에 생긴 기형적인 현상으로, MySQL은 UTF-8로 되어있지만, Apache서버가 EUC-KR로 되어있는 바람에 인코딩 문제가 발생하게 된다.
가장 좋은 해결책은 Apache 서버를 UTF-8로 인코딩을 바꾸는 것이겠지만, 국내 웹 호스팅업체에서는 그렇게 했다가는 기존 다른 계정 사용자들의 제로보드가 꼬이는 현상을 일으키게 된다.
따라서, 대개 호스팅업체에서 이 문제를 해결해 주지는 않는다.
이럴 경우, /wp-includes/wp-db.php 를 열어 42번째 줄을 찾아보면, wpdb()함수가 있다. 이를 다음처럼 고치면 된다. (정확하게는 mysql_query("SET NAMES UTF8"); 한줄을 추가하는 것으로 된다.)
[php]function wpdb($dbuser, $dbpassword, $dbname, $dbhost) {
$this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword);
if (!$this->dbh) {
$this->bail(”
Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at $dbhost. This could mean your host’s database server is down.
- Are you sure you have the correct username and password?
- Are you sure that you have typed the correct hostname?
- Are you sure that the database server is running?
If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.
“);
}
mysql_query(”SET NAMES UTF8″);
$this->select($dbname);
}[/php]