Publish: 2023-02-15 | Modify: 2023-02-15
Before, the document system of the BookStackApp used by the Cangjingge website, doc.xiaoz.me
, was built on the BookStackApp program. Unfortunately, recently, xiaoz.me
was stopped resolving by Aliyun, so we had to urgently change the address of the Cangjingge website to https://doc.xiaoz.org/. Let's record the process of changing the domain name for BookStackApp.
First, you need to modify the .env
file in the site directory and change the APP_URL
parameter to the new domain name.
Next, you also need to modify the data to replace the image address with the new domain name. Execute the following SQL statements:
Update pages SET html= REPLACE(html, 'doc.xiaoz.me', 'doc.xiaoz.org');
Update pages SET text= REPLACE(text, 'doc.xiaoz.me', 'doc.xiaoz.org');
Update books SET description= REPLACE(description, 'doc.xiaoz.me', 'doc.xiaoz.org');
In the above SQL statements, doc.xiaoz.me
is the old domain name, and doc.xiaoz.org
is the new domain name. Please modify it according to your own situation.
Finally, if your PHP component uses opcache
, you need to restart php-fpm.
This article is referenced from: https://github.com/BookStackApp/BookStack/issues/914
I come from China and I am a freelancer. I specialize in Linux operations, PHP, Golang, and front-end development. I have developed open-source projects such as Zdir, ImgURL, CCAA, and OneNav.