2

I am trying to host a Wordpress site on my old Android phone, but so far I have been unsuccessfull...

I tried with KSWEB and Ulti Server, extracted the Wordpress.zip in the sdcard, and when I try to connect to the server I am getting error with the database...

Error establishing a database connection

Does it also has to run some other SQL server on the phone for everything to work?

I really don't know what am I doing, and there aren't any good explanations on the internet, so please help me

1 Answers1

3

Wordpress requires a database to run.

After installing KSWeb, you will need to create a database for Wordpress. To do this:

  1. Open KSWeb.
  2. Go to Tools → select phpMyAdmin (it will install).
  3. Open Chrome browser.
  4. Go to localhost:8000 (to connect to phpMyAdmin).
  5. Select the Databases tab.
  6. In the box below the label Create Database enter wordpress, select create. Your wordpress database should now be created.

Now wordpress needs to be setup.

  1. Move your wordpress folder (unzipped) to /mnt/sdcard/htdocs/.
  2. Open a browser and go to localhost:8080/wordpress. It will ask you to setup your database connection.
  3. Enter root for the username and clear out the password field (you can leave everything on the default settings).
  4. Select Submit.

It should now connect WP to your database.

Thought about using a Raspberry Pi? I've setup several Wordpress Sites on the Pi (with MySQL) and you can set it up with your network for local website hosting.

References: Wordpress - Do I need a database

Firelord
  • 25,084
  • 20
  • 124
  • 286
D. Gibbs
  • 451
  • 3
  • 7
  • so can I host some other website, made with different platform? I want it to be on my phone – Sartheris Stormhammer May 06 '15 at 21:26
  • or how can I run a database server along with the other server? – Sartheris Stormhammer May 06 '15 at 22:16
  • 1
    See the modified answer on setting up everything – D. Gibbs May 07 '15 at 15:47
  • I've gotten way further than before, it's all good now, but I can't seem to be able to access the Wordpress server from external IP, I have configured my router to forward the 8080 port, but now I can't connect to the KSWEB server (I was able to connect externally to a server made with Ulti Server, but this one is giving me problems...). Any help? – Sartheris Stormhammer May 07 '15 at 16:31
  • 1
    Can you access your WP server on the same network (the LAN) that your phone is on (e.g. 192.168.1.8:8080 on your broswer from a different device)? Are you specifying the port when connecting from outside? Are you connecting from a different public IP than your phone is on? There will be issues if connecting from the same network. What is the error msg that you are getting? – D. Gibbs May 07 '15 at 19:25
  • Yes, I can connect to the Wordpress site from another phone connected to the same Wi-Fi. But if I try from my computer, using the external address of the KSWEB server, like this 78.83.*.*:8080 (with, or without /wordpress at the end) it simply doesnt load. – Sartheris Stormhammer May 07 '15 at 20:55
  • If your computer is on a different public IP than your phone, it sounds like a routing issue. If your computer shares the same public IP address, you will not be able to connect. Try using a proxy if that's the case public proxy – D. Gibbs May 07 '15 at 21:34
  • no, its something to do with the KSWEB server, I even tried with my phone on celular data, and still can't access it... and I know its KSWEB because I can access a server created with Ulti Server, from my computer – Sartheris Stormhammer May 07 '15 at 21:47
  • 1
    I did it, all I had to do on the router was forward the ports like this: 8000 > 8000 instead ot 8000 > 80 and so on – Sartheris Stormhammer May 07 '15 at 22:00