Install
1 2 3 4 5 6 7
| apt-get update apt install apache2 mysql-server php-gd php-fpm php-mysql libapache2-mod-php wget mlocate -y mv /var/www/html/index.html /var/www/html/index~.html wget https://cn.wordpress.org/latest-zh_CN.tar.gz tar -xzvf latest-zh_CN.tar.gz cp wp-config-sample.php wp-config.php chmod -R 777 ./wp-content
|
Mysql
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_pwd';
CREATE USER 'db_user'@'localhost' IDENTIFIED BY 'db_pwd'; CREATE DATABASE db_name; GRANT ALL PRIVILEGES ON db_name.* TO 'db_user'@'localhost' WITH GRANT OPTION;
export sql:
mysqldump -u root -p wordpress > wordpress.sql
import sql:
mysql -u root -p create database wordpress; use wordpress; source /path/wordpress.sql
|
php.ini
/etc/php/7.4/apache2/php.ini
1 2 3
| max_execution_time = 0 post_max_size = 1024M upload_max_filesize = 1024M
|
手动安装插件
./wp-content/plugins/*
手动安装主题
./wp-content/themes/*
avatar
在 Gravator 设置
更换 IP
1 2 3
| select * from wp_options where option_value like '%old_ip%';
update wp_options set option_value=replace(option_value,'old_ip','new_ip') where option_value LIKE '%old_ip%';
|
wp-config
不启用 FTP
1
| define('FS_METHOD', 'direct');
|
如果您喜欢此博客或发现它对您有用,则欢迎对此发表评论。 也欢迎您共享此博客,以便更多人可以参与。 如果博客中使用的图像侵犯了您的版权,请与作者联系以将其删除。 谢谢 !