Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-16 03:10:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-16 03:10:02 +0300
commit5074a6923ee1572d5e0590191206e0e4a4849287 (patch)
tree1e133860198749a655cb255fe407838181988449 /doc
parenta2fd863d3be23fee66ec7036b8febb2605c17767 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r--doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md17
-rw-r--r--doc/user/project/wiki/index.md23
2 files changed, 23 insertions, 17 deletions
diff --git a/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md b/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
index 853cc195982..b452d7c0564 100644
--- a/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
+++ b/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
@@ -423,23 +423,6 @@ projects = Project.find_by_sql("SELECT * FROM projects WHERE name LIKE '%ject'")
=> [#<Project id:12 root/my-first-project>>, #<Project id:13 root/my-second-project>>]
```
-## Wikis
-
-### Recreate
-
-WARNING:
-This is a destructive operation, the Wiki becomes empty.
-
-A Projects Wiki can be recreated by this command:
-
-```ruby
-p = Project.find_by_full_path('<username-or-group>/<project-name>') ### enter your projects path
-
-GitlabShellWorker.perform_in(0, :remove_repository, p.repository_storage, p.wiki.disk_path) ### deletes the wiki project from the filesystem
-
-p.create_wiki ### creates the wiki project on the filesystem
-```
-
## Issue boards
### In case of issue boards not loading properly and it's getting time out. Call the Issue Rebalancing service to fix this
diff --git a/doc/user/project/wiki/index.md b/doc/user/project/wiki/index.md
index f3faa66a175..c7f675417bb 100644
--- a/doc/user/project/wiki/index.md
+++ b/doc/user/project/wiki/index.md
@@ -382,3 +382,26 @@ In GitLab 14.9 and later, page slugs are now encoded using the
[`ERB::Util.url_encode`](https://www.rubydoc.info/stdlib/erb/ERB%2FUtil.url_encode) method.
If you use an Apache reverse proxy, you can add a `nocanon` argument to the `ProxyPass`
line of your Apache configuration to ensure your page slugs render correctly.
+
+### Recreate a project wiki with the Rails console **(FREE SELF)**
+
+WARNING:
+This operation deletes all data in the wiki.
+
+To clear all data from a project wiki and recreate it in a blank state:
+
+1. [Start a Rails console session](../../../administration/operations/rails_console.md#starting-a-rails-console-session).
+1. Run these commands:
+
+ ```ruby
+ # Enter your project's path
+ p = Project.find_by_full_path('<username-or-group>/<project-name>')
+
+ # This command deletes the wiki project from the filesystem.
+ GitlabShellWorker.perform_in(0, :remove_repository, p.repository_storage, p.wiki.disk_path)
+
+ # Refresh the wiki repository state.
+ p.wiki.repository.expire_exists_cache
+ ```
+
+All data from the wiki has been cleared, and the wiki is ready for use.