Manual:Maintenance scripts/hi

This page is a translated version of the page Manual:Maintenance scripts and the translation is 32% complete.
  • Community Noun project 2280.svg Users
  • Octicons-terminal.svg System Administrators
  • Source code project 1171.svg Developers
  • OOjs UI icon language-ltr.svg Translators

The maintenance scripts are used to perform various administrative, import, maintenance, reporting and upgrade tasks. The scripts are written in PHP and live in the maintenance subdirectory of MediaWiki installs.

सामान्य उपयोगिता और गुणवत्ता की बदलती डिग्री के साथ दर्जनों लिपियाँ हैं। उपयोग करने से पहले आपको एक स्क्रिप्ट पर प्रलेखन को ध्यान से पढ़ना चाहिए; यदि कोई स्क्रिप्ट प्रलेखित नहीं है, तो उसे चलाने में अतिरिक्त सावधानी बरतें।

विन्यास The $wgDBadminuser and $wgDBadminpassword configuration variables must be set in order to run maintenance scripts that need to alter the structure of the database (like Manual:update.php ) if the user configured in Manual:$wgDBuser doesn't have enough permissions. Alternatively, you can pass the --dbuser and --dbpass parameters to the script. The values for these variables differ based on the database engine that is being used to power your installation of MediaWiki. यदि कॉन्फ़िगर नहीं किया गया है, तो यह Manual:$wgDBuser में कॉन्फ़िगर किए गए उपयोगकर्ता का उपयोग करेगा।


Some of the maintenance scripts require database permissions that, for security reasons, the main MediaWiki database account should not have. A separate database account with 'superuser' privileges for just the MediaWiki database should be created (if it does not already exist.) If the database that you use for MediaWiki is called wikidb, then the following SQL would create such a user who can exercise superuser privileges on localhost.:

GRANT ALL PRIVILEGES ON wikidb.* TO 'wikidbadmin'@'localhost' IDENTIFIED BY 'strong-password';

Once the account exists, the account name should be set in the $wgDBadminuser configuration variable. Like other configuration variables, $wgDBadminuser should be set in LocalSettings.php . A password for $wgDBadminuser must be set in the $wgDBadminpassword configuration variable.


PostgreSQL uses a different security model than MySQL and the same PostgreSQL server account used for day-to-day operation of the MediaWiki installation must also be used for running the maintenance scripts. This is necessary to ensure that the owner for new tables created by the maintenance scripts is set correctly. You don't need to set $wgDBadminuser or $wgDBadminpassword at all.

लिपियों को चलाना

Instructions with NameCheap
Example of IP address and FTP user name and password on the hosting site.

रखरखाव लिपियों को तब कमांड लाइन से चलाया जाना चाहिए। जो उपयोगकर्ता अपने टर्मिनल से सीधे सर्वर तक नहीं पहुंचते हैं, वे आमतौर पर के माध्यम से एक कनेक्शन स्थापित करेंगे। For Linux/Unix users this is by using the ssh client in a shell. For Windows users, one can use the SSH command line tool introduced in Windows 10 or alternatively use a third-party tool such as PuTTY shown below or use Windows Subsystem for Linux.

Required program for Windows users: PuTTY ( or any terminal emulator

Under the Host Name (or IP address) enter the IP Address of your web hosting site.
  • Step 2: In PuTTy, under the Host Name (or IP address) enter the IP Address of your web hosting site (Contact your website provider if necessary) and click Open.
At the login as: line enter the FTP user name.
  • Step 3: A command screen will pop up. At the login as: line enter the FTP user name.
On the FTP user name@IP Address's password line: type the FTP password.
  • Step 4: Enter the FTP password.
पोटीन कमांड लाइन।
  • Step 5: Change the current directory to the "maintenance" folder, which is found in the specific MediaWiki folder.

You can type pwd to see what folder you are currently in.

See MediaWiki for instructions or NameCheap on how to change the current directory to the "maintenance" folder.

Remember to type: cd[space]/home/NAME OF MAIN FOLDER/NAME OF WIKI FOLDER/maintenance

$ cd maintenance
  • चरण 6: रखरखाव स्क्रिप्ट को निष्पादित करें जिसे चलाने की आवश्यकता है:
$ php rebuildall.php
If you get an error (for example: php.exe is no valid Win32 application), try the following:
$ php-cgi rebuildall.php
विंडोज में, कमांड है:
$ C:\path\to\php\php-win.exe C:\path\to\mediawiki\maintenance\rebuildall.php
If your script fails to run, and spews out a lot of error messages, the first thing to try is to set the MW_INSTALL_PATH environment variable to point to the root of your MediaWiki installation. This will help scripts to find the necessary files, and is particularly relevant when running maintenance scripts provided by third-party extensions.

मानक कमांड लाइन विकल्प

Almost every PHP script in /maintenance supports several standard options:

मदद संदेश प्रदर्शित करता है
--conf <path>
Location of LocalSettings.php, if not default (at parent directory of the script)
--dbuser <username>
स्थानीय खाते में निर्दिष्ट एक के बजाय उपयोग करने के लिए डेटाबेस खाता। एफपी, उन लिपियों के लिए उपयोग नहीं किया जाता है जिनके लिए डेटाबेस कनेक्शन की आवश्यकता नहीं होती है या जब SQLite डेटाबेस बैकेंड का उपयोग किया जाता है
--dbpass <password>
Database password to use instead of the one specified in LocalSettings.php, not used for scripts that don't require a database connection or when SQLite database backend is used
डिबगिंग के लिए प्रसंस्करण के अंत में आउटपुट ग्लोबल्स
--memory-limit <value>
Set memory limit for the script. Accepts ordinary numbers, standard php.ini abbreviations (1024K, 20M, 1G), max for no limit (will be used by default if omitted) and default for no change. (introduced in 1.17)
गैर-त्रुटि आउटपुट को दबाएं
--wiki <id>
Wiki ID for wiki farms. This may be of the form dbname or dbname-prefix. LocalSettings.php will be run with the MW_DB and MW_PREFIX constants defined accordingly.
Profiler output format (usually "text"). (introduced in 1.22)
Enable built-in MediaWiki development settings. (introduced in 1.31)

मीडियाविकि उन संस्थापनों का उपयोग करता है, जो सिमिलिंक

ऐसे मामलों में जहां MediaWiki php फाइलें एक केंद्रीय इंस्टॉलेशन से मेल खाती हैं, आपको LocalSettings.php फाइल के पथ के रखरखाव स्क्रिप्ट को निर्दिष्ट करने की आवश्यकता होगी। उदाहरण के लिए

php maintenance/importImages.php --conf /var/wwwdata/ /tmp/wikiimages .jpg .png .svg

अन्यथा आपको यह त्रुटि मिलेगी:

A copy of your installation's LocalSettings.php
must exist and be readable in the source directory.

MediaWiki installs that use shared settings (family type)

Sometimes MediaWiki is installed as a family for many languages and settings (LocalSettings.php) are split to common part and language parts (see Manual:Wiki family#Shared Settings ) where common part is located outside of /w directory and accessed using relative link (require_once "../ExtensionSettings.php";). In this case maintenance scripts will not work when running them in /w/maintenance directory. Run them from /w directory instead:

$ php maintenance/rebuildall.php

नो शेल एक्सेस

On many shared hosts, you won't have shell access. The following extensions may be useful to run maintenance scripts via the web: Maintenance and MaintenanceShell .

रखरखाव लिपियों की सूची

इसके बजाय शायद पुरानी सूची में,

Here is the list of files included in the maintenance subdirectory located at the root of a MediaWiki installation. You can contribute to this manual by keeping this list up to date, adding a description of these files' specific purpose and of how an administrator should use them (command line examples, etc.). Be aware that these were created and named on an ad hoc basis so have some usability issues.









इसे भी देखें