Install Mediawiki: Difference between revisions

From Creative Crowds wiki
Jump to navigation Jump to search
(Created page with " sudo su apt install mariadb-server mysql CREATE USER 'wiki'@'localhost' IDENTIFIED BY 'INSERTPASSWORDHERE'; CREATE DATABASE wikidb; GRANT ALL PRIVILEGES ON wikidb.* TO 'wiki'@'localhost'; FLUSH PRIVILEGES; EXIT; apt install php php-fpm php-mysql php-xml php-intl php-mbstring php-gd php-curl chown -R www-data:www-data /opt/wiki/ chmod -R 755 /opt/wiki/ Left the installation at: * /opt/wiki/ is configured, and the nginx alias works * php is not worki...")
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 17: Line 17:


  apt install php php-fpm php-mysql php-xml php-intl php-mbstring php-gd php-curl
  apt install php php-fpm php-mysql php-xml php-intl php-mbstring php-gd php-curl
Download Mediawiki from the website
into the folder: <code>/opt/</code>, rename folder to <code>wiki</code>


  chown -R www-data:www-data /opt/wiki/
  chown -R www-data:www-data /opt/wiki/
  chmod -R 755 /opt/wiki/
  chmod -R 755 /opt/wiki/


Left the installation at:
Configure nginx
 
<pre>
# ---------------------------------------------------
# WIKI
 
location /wiki/ {
        root /opt/;
        index index.php;
        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/run/php/php8.4-fpm.sock;
                include fastcgi_params;
        }
}
</pre>
 
(More stuff needs to be added.. later)
 
Migrate the database
 
Following this: https://www.mediawiki.org/wiki/Manual:Restoring_a_wiki_from_backup
 
Worked
 
Then this error appeared: <code>Class "Wikimedia\Parsoid\DOM\HTMLDocument" not found</code>
 
Followed this: https://phabricator.wikimedia.org/T409283
 
Worked!


* /opt/wiki/ is configured, and the nginx alias works
Done
* php is not working in this folder though... index.php is not picked up: 404

Latest revision as of 20:45, 12 December 2025

sudo su
apt install mariadb-server
mysql
CREATE USER 'wiki'@'localhost' IDENTIFIED BY 'INSERTPASSWORDHERE';
CREATE DATABASE wikidb;
GRANT ALL PRIVILEGES ON wikidb.* TO 'wiki'@'localhost';
FLUSH PRIVILEGES;
EXIT;
apt install php php-fpm php-mysql php-xml php-intl php-mbstring php-gd php-curl

Download Mediawiki from the website

into the folder: /opt/, rename folder to wiki

chown -R www-data:www-data /opt/wiki/
chmod -R 755 /opt/wiki/

Configure nginx

# ---------------------------------------------------
# WIKI 

location /wiki/ {
        root /opt/;
        index index.php;
        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/run/php/php8.4-fpm.sock;
                include fastcgi_params;
        }
}

(More stuff needs to be added.. later)

Migrate the database

Following this: https://www.mediawiki.org/wiki/Manual:Restoring_a_wiki_from_backup

Worked

Then this error appeared: Class "Wikimedia\Parsoid\DOM\HTMLDocument" not found

Followed this: https://phabricator.wikimedia.org/T409283

Worked!

Done