WordPress Blog Server through Entware-NG

1) RMerlin's firmware from here
2) Entware-NG must be setup from here
3) Lighttpd web server from this guide

If you meet all the requirements, login to router with putty terminal and enter:

opkg install mysql-server
opkg install wget
opkg install php5-mod-mysql
mysql_install_db --force
/opt/etc/init.d/S70mysqld restart
mysql -u root

Choose a username and a password for your database and replace those in red color

mysql> create database wordpress;
mysql> grant all privileges on wordpress.* to user_name@localhost identified by 'db_password' ;

Exit with Ctrl-C

/opt/etc/init.d/S80lighttpd restart
cd /opt/share/www
wget https://wordpress.org/latest.tar.gz --no-check-certificate && tar -zxvf latest.tar.gz && rm latest.tar.gz
chown -R admin: wordpress

Go to
Choose a language
Click on Create a Configuration File
On the next page click on "Let's go!"
Now fill in with user_name and db_password created earlier with mysql commands.
Change Database Host from localhost to
Press "Submit"
On the next page, click on "Run the install"
Choose a Site Title, username, password (don't have to be the same as for mysql)
Enter your email adress
Press "Install WordPress"
Log in
Customize appearance, add widgets, menus, plugins...
Now access your blog on to see how it looks.
Create an asus, no-ip or dyndns dynamic dns account and the blog can be accessed from your_dns_account/wordpress or your_wan_ip_adress/wordpress

Create a backup of your blog and mysql database directly from the router, (if your usb disk has a label, change sda1 with usb label)

cd /mnt/sda1
tar -zcvf wordpress.tar.gz /mnt/sda1/entware-ng/share/www/wordpress/
tar -zcvf wordpress_db.tar.gz /mnt/sda1/entware-ng/etc/mysql/wordpress

If something goes wrong, just restore with:

cd /
tar -zxvf /mnt/sda1/wordpress.tar.gz
tar -zxvf /mnt/sda1/wordpress_db.tar.gz

I hope everything goes smoothly for you, if not, don't hesitate to ask here.

See HERE a terminal recording

Youtube video HERE

Tested at 14/03/2016 on RT-AC68U, wordpress v4.4.2

  • Eugen

    Hi, i know manual was published 5 years ago). But now i can't start mysql. Now there is mariadb-server in repos.It had been installed, but does not started. here is my logs:
    admin@SOME:/tmp# opkg install mariadb-server mariadb-client
    Installing mariadb-server (5.5.57-1) to root...
    Downloading http://pkg.entware.net/binaries/mipsel/mariadb-server_5.5.57-1_mipselsf.ipk
    Installing libmariadb (5.5.57-1) to root...
    Downloading http://pkg.entware.net/binaries/mipsel/libmariadb_5.5.57-1_mipselsf.ipk
    Installing libstdcpp (5.4.0-1) to root...
    Downloading http://pkg.entware.net/binaries/mipsel/libstdcpp_5.4.0-1_mipselsf.ipk
    Installing libpthread (1.0.17-1) to root...
    Downloading http://pkg.entware.net/binaries/mipsel/libpthread_1.0.17-1_mipselsf.ipk
    Installing libncurses (6.0-1c) to root...
    Downloading http://pkg.entware.net/binaries/mipsel/libncurses_6.0-1c_mipselsf.ipk
    Installing libreadline (7.0-1) to root...
    Downloading http://pkg.entware.net/binaries/mipsel/libreadline_7.0-1_mipselsf.ipk
    Installing libpcre (8.41-2) to root...
    Downloading http://pkg.entware.net/binaries/mipsel/libpcre_8.41-2_mipselsf.ipk
    Installing resolveip (2) to root...
    Downloading http://pkg.entware.net/binaries/mipsel/resolveip_2_mipselsf.ipk
    Installing mariadb-client (5.5.57-1) to root...
    Downloading http://pkg.entware.net/binaries/mipsel/mariadb-client_5.5.57-1_mipselsf.ipk
    Configuring libpthread.
    Configuring libstdcpp.
    Configuring libncurses.
    Configuring libreadline.
    Configuring libmariadb.
    Configuring mariadb-client.
    Configuring libpcre.
    Configuring resolveip.
    Configuring mariadb-server.
    admin@SOME:/tmp# mariadb-server
    -sh: mariadb-server: not found
    admin@SOME:/tmp# mysql
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/tmp/mysql.sock' (2)
    admin@SOME:/tmp/mnt/sda1/entware-ng/etc/init.d# ./S70mariadbd restart
    cat: can't open '/opt/var/run/mysqld.pid': No such file or directory
    I dont want to install croot debian. What can i do also?

  • Sander

    i got a page after trying to create the wp config file in the webbrowser saying: Error establishing a database connection. double checked all fields, i can still login to the DB via the terminal window. Any ideas?

  • ShitTechUSA

    Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

    Help me! I have installed the MySQL extension!

    • opkg install php5-mod-mysql
      /opt/etc/init.d/S70mysqld restart

      Working fine and I updated to 4.2.2 from wordpress dashboard :)

      • ShitTechUSA

        I still get the error :P


        • What address is this mysil.space ?
          Are you sure is not wrong?

          • ShitTechUSA

            Yep, thats my domain :P

            Just look it up at Whois ;)

          • ShitTechUSA


            I managed to screw it up even more, now I just get connection refused. Ive tried to reinstall everything (aside wget and nano) and it wont fix itself!

  • osokorki

    I have successfully accessed my site at, but it does not work properly when accessing wan, because all the internal links of the site remain with the link to the address - http://osokorki.asuscomm.com:81/wordpress/
    How to fix this situation?
    Html website is working well - http://osokorki.asuscomm.com:81/art/

    • Elz

      If you change the web address or the ip of your wordpress installation you must manually change the new address in the database. Connect to your database using a program like phpmyadmin or adminer. Go to worpress database, go to table wp_options , and browse this table. You must change this two fields:
      position 1 - siteurl
      position 33 - home

    • Elz

      by the way. you can also set it in the wp-config.php . if you set it in the config it will overwrite the those 2 values in the database. read the wordpress documentation https://codex.wordpress.org/Editing_wp-config.php#Blog_address_.28URL.29

      • TeHashX

        This comment was 15 months ago :)

        • Elz

          No problem. This kind of problem is quite often on WordPress. Others will read in the future. WordPress make really hard for users to change domain name later. Only yesterday I found out that you can assign the domain name in a dynamic way in the wp-config so the WordPress to not be dependent by domain name. This should be the default !!

          Also if you are moving an old wordpress site to a new domain the things are a little bit more complicated. Because in WordPress when you introduce an image in a post, wordpress introduce the full path to image (not the relative path) in the post (also database).
          So even if you are changing the domain name in the settings, the old database will contain links the old domain. The solution is that before importing the database to the new domain, open the exported database (SQL format) in a text editor like Notepad++ , press CTRL+H (Find & Replace function) and replace the olddomain.com with the newdomain.com all over the document.

          • TeHashX

            Ok, multumesc :)

  • Ramasjang

    Hello again

    Thanks for all the guides her :-)

    I am having trouble between Press "Submit"On the next page, click on "Run the install"

    My browser timed out, when I try and connect again, i get this:

    Fatal error: Maximum execution time of 30 seconds exceeded in /tmp/mnt/sda2/entware/share/www/wordpress/wp-includes/wp-db.php on line 1164

    • Didn't tried with wordpress v4.0, I will check later

      • TheOpenSourceTV

        Hi, I have this installed but get the error on one of my bigger WordPress sites (latest v4.4.2) only on the home page though:


        Fatal error: Maximum execution time of 30 seconds exceeded in /tmp/mnt/Linux/entware-ng/share/www/wp-includes/class-wp-image-editor-gd.php on line 198

        My swap file is 1GB though...?

        This standard WordPress install works fine: http://digitaldomain.asuscomm.com/wordpress/

        Also, how do I go about installing PHPMyAdmin and increasing upload and timeout limits?

        I have PHPMyAdmin installed but just can't login: http://digitaldomain.asuscomm.com/phpmyadmin/index.php

        #2002 - Can't connect to local MySQL server through socket '/opt/tmp' (146)The server is not responding (or the local server's socket is not correctly configured).

        Any ideas how to get MySQL working so I can login to PHPMyAdmin?

        Thanks for the excellent tutorials, never knew ASUS RT-AC66U, or any router for that matter, could be setup as a Web Server and Home Cloud Server, sweet deal ;)

        • TeHashX

          It't a configuration issue, should work, try with optware-ng

          • TheOpenSourceTV

            I tried optware-ng and it was so slow to install everything plus MySQL gave errors trying to install with a 2GB swap file so couldn't even get that working nevermind PHPMyAdmin... Entware seems much faster to install packages etc. on my router. Not sure about website performance yet though...

            How do i edit the Entware-NG install to make the mysql.sock file work properly and get PHPMyAdmin working? Symlink maybe?

            Would it be worth switching back to Cherokee for the web server if im just going to use this for a streaming documentary website?


          • TeHashX

            Just the install is slow but after it's all good.
            This guide is "very old" made for entware, should I update it for entware-ng?

          • TeHashX

            OK, guide updated, please try

          • TheOpenSourceTV

            Hi TeHashX, thanks for the updated guide but I'm still stuck on how to get PHPMyAdmin working properly. I used your other guide for Optware-NG to get PHPMyAdmin installed on Entware-NG but the PHPMyAdmin login page just won't let me in with the correct details...


            How do i edit the Entware-NG install to make the mysql.sock file work properly and get PHPMyAdmin working?

            Here's the error I get when trying to login with username and password on the PHPMyAdmin login page:

            #2002 - Can't connect to local MySQL server through socket '/opt/tmp' (146)The server is not responding (or the local server's socket is not correctly configured).

            So how to correctly configure the server socket for MySQL server?


          • TeHashX

            I still dunno why you need phpmyadmin, you have to modify php.ini for Maximum execution time
            Anyway, I made a new tutorial specially for you, will be live at 01:00 AM (less than an hour) :)

          • TheOpenSourceTV

            Just that PHPMyAdmin is easier and faster for editing multiple large databases, I'm a web developer so I use it a lot. Thanks for the tutorial :)

          • Elz

            You probably installed the latest phpmyadmin version that is made for newer mysql version. thats why you have that error. I had the same problem and i manually set the socket in the phpmyadmin config to make this work. Read my comment to this article: https://www.hqt.ro/how-to-install-mysql-server-phpmyadmin-through-entware-ng/
            Or just install an older version of phpmyadmin (the version in the tutorial made by TeHashX)

          • TeHashX

            Mysql-server on entware-ng is old and latest working version of phpmyadmin is phpMyAdmin- but still need some tweaks


    • I updated the guide, try installing again, just don't update to v4.0 (not enough memory)

    • I updated wordpress to 4.2.2 successfully :)


To be notified by email when a new tutorial is posted :)

Thanks for Subscribing! I'll keeping you up-to-date with latest tutorials!

Something went wrong, try again...