Clone code from GitHub and install mediawiki to find the git source
Last year, I wrote a verbal mw plug-in for a while, but I felt that the plug-in was not very well written at that time, so I plan to reorganize it recently, unfortunately, the original account was blocked when I configured the ss on c9 a few days ago, but I had to re-register the account and re-open the workspace.
So this time I plan to try a new method. on github, I star the git library of mediawiki. I want to install it this time and go to GitHub to find the repostiory (here ), I flipped through the release and found a 1.26 release, but it seems that only the compressed package is downloaded. it seems that this is not what I want (of course there is also a commit id, you should clone it, I did not try ). I turned branch back and saw what I needed.
The release here has the corresponding branch. for example, REL1_3 represents a release with version = 1.3.
Clone code. The directory is not empty?
I picked a 1.26 (because I used 1.26 for a wiki site I was using), copied the git address, and then came back to the bash of c9
git clone git@github.com:wikimedia/mediawiki.git -b REL1_26 .
The one behind it indicates that I want to clone the code to the current folder instead of creating a folder. But it always reports an error to me.
fatal: destination path '.' already exists and is not an empty directory.
The current directory is not empty. It is indeed not empty, because there are several files in the workspace directory of c9 for demonstration, and a php. ini is used to allow users to configure their own php environment. The other two can be deleted but php. I don't want to delete ini, but I am afraid it will be troublesome after I delete it. after goolge's stackoverflow, some people have encountered such a situation. then there is a solution below. after reading it, I have an impulse to hit the wall 233333.
git init . git remote add -t \* -f origin
git checkout master
The original article is here
Need composer
After the complete pull was put down, it would take up to 500 MB at first glance, which was quite large. later, a Daniel in the maintenance group said that we could use -- depth = 1 to specify the depth, okay, I forgot.
I thought that, as usual, apache and mysql can be directly opened to run, but I did not expect to open it but prompt my error
A composer is needed, and a page on the official website (here) is guided later. the following section describes how to install
Fetch external libraries
Starting with MediaWiki 1.25, some external libraries that MediaWiki requires are no longer in this "core" git repository. We use composer to manage them. To install these needed libraries, you have a choice:
* Download and install composer, switch to your core directory and then run composer install -- no-dev. note that if you have an existing composer. lock file you will need to run composer update -- no-dev instead.
* If you don't want to use composer, or if you want to use the same set of vendor libraries as used on the WMF production cluster, you can instead git clone https://gerrit.wikimedia.org/r/p/mediawiki/vendor.git to create a vendor/directory inside the core folder of your MediaWiki installation. make sure you use the right branch for your MediaWiki version (e.g. rel120025 for 1.25 ).
Download composer first
curl -sS https://getcomposer.org/installer | php
Then follow the mw official instructions to compose
composer install --no-dev
After running, the current compose progress will be displayed, and you will be able to finish the operation.
Core has no subject
Starting from the first step of installation, the interface was strange. it was not until I was prompted that I had not completed the Theme Installation and opened the home page.From 1.24 mw, core does not have a topic.So we cloned the default skin Vector to the skins/directory in the git skin repository, and added the skin require in LocalSetting. php.
require_once "$IP/skins/Vector/Vector.php";
Then, everything is done. √