WordPress rebuild broken permalinks6 September 2008, 19:09:09 |
No way (programs, plugins) to fix links automatically, use script like the following:
1 2 3 4 5 6 7 8 9 10 11 12 | <? $blog_url=’http://localhost/jehy.ru/articles/’; $prefix=’wp_’; $sql=’SELECT `id`,`post_name` FROM `’.$prefix.’posts`’; $result=mysql_query($sql); while($row=mysql_fetch_array($result)) { $sql2=‘UPDATE `’.$prefix.‘`posts` SET `guid`=”‘.$blog_url.‘archives/’.$row['id'].‘/’.$row['post_name'].‘” where id=”‘.$row['id'].‘”‘; mysql_query($sql2); } ?> |
| Tags: wordpress, кодерское | Comments [ 0 ] |

Subscribe? Sure? What for?
Leave a Reply