Installing manually WordPress on Synology NAS DS1621+

Currently reading
Installing manually WordPress on Synology NAS DS1621+

6
0
NAS
DS1621+
Router
  1. RT2600ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Hello,

I hope that someone can help me out. I spent the last 10 hours of my day trying to figure way changing the name of "web/wordpress" but it stops working. I want to run three different sites on my NAS.

I've follow all the instructions on the official site to install it manually, learn how to create a new MariaDb 10 database with the phpMyAdmin, create user, password, grant all privileges, etc. I tested everything to understand why when I make a second site, a different one that the one Synology provides (that works perfectly).

I created a new database and copy the information to the wp-conf.php and works fine. But when I change that folder's name stops from working, even though it is supposed to work.

I turned the debugger on and this is what I get when I change the name of the "web/wordpress" folder say to "web/tiendaanimal" and this is what I get:

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /volume1/web/tiendaanimal/wp-includes/wp-db.php:1685 Stack trace: #0 /volume1/web/tiendaanimal/wp-includes/wp-db.php(632): wpdb->db_connect() #1 /volume1/web/tiendaanimal/wp-includes/load.php(527): wpdb->__construct('user_carlos_g_b...', 'JJo8%-7BmU&-KpP...', 'db_carlos_g_ber...', 'localhost') #2 /volume1/web/tiendaanimal/wp-settings.php(124): require_wp_db() #3 /volume1/web/tiendaanimal/wp-config.php(90): require_once('/volume1/web/ti...') #4 /volume1/web/tiendaanimal/wp-load.php(37): require_once('/volume1/web/ti...') #5 /volume1/web/tiendaanimal/wp-blog-header.php(13): require_once('/volume1/web/ti...') #6 /volume1/web/tiendaanimal/index.php(17): require('/volume1/web/ti...') #7 {main} thrown in /volume1/web/tiendaanimal/wp-includes/wp-db.php on line 1685
There has been a critical error on this website.

Thank you so much for your time.
All the best
 
Compare the permissions on /web/wordpress and /web tiendaanimal folders the container may not be able to access it and thus throws the error.
 
Thank Akira, I am working hard on being able to install multiple sites on my NAS but I am not very knowledgeable, bear with me.

Does permissions change when I rename the folder
/web/wordpress
to
/web/wp1

Please let me know. I think that if I can solve having the working copy (/web/wordpress) be renamed and continue working I would have solved having different sites on my NAS.

Thank you
 
In your synology UI right click on the folder, select properties, then the permissions tab.
Compare the working version to the version which doesn't work, are the permissions the same?
 
Hello Akira,

I finally had the time to explore your directions and this is what I found out.

1. renamed folder has the same permissions
2. at the moment I rename the folder, the WordPress package displays an error that if I click on fix it installs another instance in the default folder, wordpress, that doesn't work. I installed it and reinstalled and back to work fine.
http a.png
http b.png
http b.png


Thank you so much for your time. If you have more suggestions I would really appreciate them.



wp1.png
wp1 a.png
 
Ah.. You're trying to use the Synology Wordpress.
I wouldn't be surprised if that has the folder hard coded somewhere.
You'd need to look at doing it with docker.
 
Last edited:
Ok... Here's how you need to do it (or how I would do it using the synology docker).
Open HeidiSQL (I know you can do it with phpmyadmin but I don't have Synology's mariadb or phpmyadmin installed and am using port 3306 and 3307 so can't install either maridb. (You may need to change root's permissions using phpmyadmin so you can use HeidiSQL from your computer).
Put in the IP of your NAS, then 3307 as the port (I saw from a screenshot you're using mariadb10) username is root and whatever your root password for mariadb is. Then click open.
1614949951245.png

Right click, Create New, database:
1614950021003.png

Name it whatever you like (I'd go with the name of the first wordpress site I wanted)
Repeat until you have a database for each of the sites you want.
Now in the top bar, select tools and user manager:
1614950113029.png

Click add (with the green plus) and use a username so you recognise it change host to local network, specify a password and click add object, then select the wordpress database you want to associate with this user:
1614950428050.png

Now, tick the box to give it the permissions it needs on the database:
1614950491567.png

Repeat for each database, so that you have a database with a user and password associated to it.
(You need all of this information)
DatabaseUserpassword
Wordpress1Wordpress1DOnotUSEthisPASSWORD1
Wordpress2Wordpress2DOnotUSEthisPASSWORD2
Ok, now open docker in the Synology UI then on the registry search for wordpress.
Use the official image which has the medal with a tick in it and select latest (which is default) and click select.
Let it download and then in image select it and click launch.
In the container name, name it whatever the site is going to be called.
Port settings - set the local port to the port you want it to be accessible on (each will need to have a seperate port).
Then in environment add the following Environmental Variables:
Variable Value
WORDPRESS_DB_HOST <NASIP>:3307
WORDPRESS_DB_USER <UserFromAboveTable>
WORDPRESS_DB_PASSWORD <PasswordFromAboveTable>
WORDPRESS_DB_NAME <DatabaseFromAboveTable>
WORDPRESS_TABLE_PREFIX <SeeNextNote>
If you wanted to you could use the same DB_HOST,DB_USER,DB_PASSWORD and DB_NAME and just specify Table_prefixes for each database. (Sorry this is a learning curve for me as I've never set up a Wordpress site before).
Personally I'd keep each one seperate, but that's just me.

I have no idea if this is the optimal way of doing this or not, however with the information you provided, and assuming it is the correct way of doing it, the above is what you need to do.

Oof that took longer than I expected, plus I nearly added the wrong details (I'd have specified the docker network and the container name, but I'm thinking in docker-compose and with containers talking to eachother).
If anyone has any better ways of doing this, please chime in and point out what I could have done better. :)
 
Hi Akira!

Thank you so much for sharing how to do this. I will try as soon as I have time to get into it. Hopefully tonight!:)

I have being reading also in the WordPress site how to do a manual install and I could not make it to work but maybe I didn't do well the permissions as you point out in your first post. I live you the link.


I'll get back to you after trying what you showed me.
 
Hi Akira,

I tried to follow your directions the best I could but probably I failed because it does not work yet.

I check again all the steps and get back to you
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

Just found a workaround setting up Docker, and installing Debian with openssh-client. Works.
Replies
1
Views
6,444
  • Question
In the settings section (button) of the package center you will see the auto update tab
Replies
3
Views
5,536
  • Solved
Thanks, I was trying to install it at the wrong place, its running now thanks
Replies
6
Views
4,145
Replies
4
Views
1,021
Wordpress has been working, then yesterday I noticed updates, did these above and now I can't get to the...
Replies
0
Views
1,286
I just decided to have www.mydomain.com as canonical domain name. The need of having a redirect, is that...
Replies
54
Views
12,360
Alright! (y) No problem, happy to help. The beginning is always the hardest, but you will get the hang...
Replies
39
Views
9,651

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top