一、修改apache配置文件,使apache监听8001端口
# more /etc/apache2/ports.conf |grep -v “#”
NameVirtualHost *:8001
Listen 8001
Listen 443
# more /etc/apache2/sites-available/wordpress
二、wordpress关于端口的不在配置文件里,而在数据表wp_options中的siteurl和home两个变量
mysql> update wp_options set option_value = ‘http://sas.123.com:8001‘ where option_id = 1;
mysql> update wp_options set option_value = ‘http://sas.123.com:8001‘ where option_id = 37;
三、原有文章中如果有插图,则插图的URL地址要更新
mysql> UPDATE wp_posts SET post_content = REPLACE( post_content, “http://sas.123.com“, “http://sas.123.com:8001” ) where post_date < “2011-09-15”;
wordpress更改默认URL和端口的方法