通过符号链接在本地主机上更新wordpress

时间:2019-03-14 16:53:27

标签: wordpress updates

我正在尝试本地更新在页面上托管的wordpress。它要求我提供新的wordpress文件夹名称。我应该在哪里写名字?

#!/usr/bin/env bash

echo "This script is intended to update all the needed symlinks to a new wordpress folder" pwd NAME=${1?ERROR: You NEED to provide the name of the new wordpress folder (e.g. wordpress-4.9.7}

echo "STARTING PROCESS FOR FOLDER $NAME" echo "--------------------------------"

echo "DELETING OLD SYMLINKS - STARTING" rm web/index.php rm web/wp-activate.php rm web/wp-admin rm web/wp-blog-header.php rm web/wp-comments-post.php rm web/wp-cron.php rm web/wp-includes rm web/wp-links-opml.php rm web/wp-login.php rm web/wp-mail.php rm web/wp-settings.php rm web/wp-signup.php rm web/wp-trackback.php rm web/xmlrpc.php echo "DELETING OLD SYMLINKS - FINISHED" echo "--------------------------------"

echo "CREATING NEW SYMLINKS - STARTING" ln -s ../$NAME/index.php web/index.php ln -s ../$NAME/wp-activate.php web/wp-activate.php ln -s ../$NAME/wp-admin web/wp-admin ln -s ../$NAME/wp-blog-header.php web/wp-blog-header.php ln -s ../$NAME/wp-comments-post.php web/wp-comments-post.php ln -s ../$NAME/wp-cron.php web/wp-cron.php ln
-s ../$NAME/wp-includes web/wp-includes ln -s ../$NAME/wp-links-opml.php web/wp-links-opml.php ln -s ../$NAME/wp-login.php web/wp-login.php ln -s ../$NAME/wp-mail.php web/wp-mail.php ln -s ../$NAME/wp-settings.php web/wp-settings.php ln
-s ../$NAME/wp-signup.php web/wp-signup.php ln -s ../$NAME/wp-trackback.php web/wp-trackback.php ln -s ../$NAME/xmlrpc.php web/xmlrpc.php echo "CREATING NEW SYMLINKS - FINISHED" echo "--------------------------------"

echo "UPDATING WP_LOAD.PHP" rm web/wp-load.php cp $NAME/wp-load.php $NAME/wp-load-backup.php cp $NAME/wp-load.php web/wp-load.php rm $NAME/wp-load.php ln -s ../web/wp-load.php $NAME/wp-load.php echo "--------------------------------"

0 个答案:

没有答案