我正在托管在AWS Lightsail实例(Bitnami)上的WordPress网站上工作,我想拥有版本控制,以与同事一起在我们的网站主题上工作。
我喜欢只需要 git拉
才能更改网站的想法。
在WordPress文件夹中(包含WP-ADMIN,许可证,WP-Config.php等...),有WP-CONTENT文件夹,但这是一个符号链接,将WordPress文件夹以外指向 root/bitnami /wordpress/wp-content
。我不能在WordPress文件夹中使用git,但是我可以在 root/bitnami/wordpress/wp-content
中设置它线。
WP-content文件夹是一个符号链接,是否有一个原因指向WordPress文件夹之外,或者只是设置事物的人的错误?
在这种情况下,使用Git绕过FTP客户端可以吗?
I'm working on a wordpress site hosted on an AWS Lightsail instance (Bitnami) and i'd like to have version control to work on our site themes with a coworker.
I like the idea of just having to git pull
to make changes to the site.
In the wordpress folder (that contains wp-admin, licences, wp-config.php, etc...), there is the wp-content folder but it's a symbolic link that points outside the wordpress folder to root/bitnami/wordpress/wp-content
. I can't use git in the wordpress folder but I can set it up in the root/bitnami/wordpress/wp-content
but it feels like bad practice since it asks me for admin privileges for every command line.
Is there a reason the wp-content folder is a symbolic link that points to outside the wordpress folder or is it just a mistake from the person who set things up?
Is it okay to use git to bypass an ftp client in this case?
发布评论
评论(1)
因此,我今天只是遇到了同样的问题,我通过将目录的目录移动到Symlinks的位置并删除Symlinks来解决此问题。
这是我的过程(尽管您可以首先删除符号链接):
MV/BITNAMI/WORDPRESS/WP-CONTENT/location/of/wordpress/exture-directory-name
rm -f/location/of/wordpress/
mv/of/wordpress/wordpress/exture-directory-name/location/of/wordpress/wordpress/wp-content < /code>
您可以重复WP-config.php文件的相同步骤。完成此操作后,我就可以验证WordPress仍在使用Lightsail实例。希望这会有所帮助
So I just had this same issue today, and I resolved this by moving the directories for .../wp-content to the location of the symlinks and deleting the symlinks.
This was my process (though you could delete the symlinks first):
mv /bitnami/wordpress/wp-content /location/of/wordpress/temporary-directory-name
rm -f /location/of/wordpress/
mv /location/of/wordpress/temporary-directory-name /location/of/wordpress/wp-content
You can then repeat the same steps for the wp-config.php file. Once this was done I was able to verify Wordpress was still working on my LightSail instance. Hope this helps