Make everything so simple.
This will guide you to use WP Downloader, in an Android device in localhost.
Tip
For iOS, you may try to configure iSH, the Termux equilent. Most of the configuration would be the same.
Note
Note that this documentation is absolutely NOT For Seniors. It's for noobs.
-
- We'll use Termux, a Linux Terminal Emulator, to install NodeJS, and ru WP-Downloader.
Tip
We are going to do the same we used to do in Desktop, but not now (thanks to Electron Wrapper, in Android.
Note
For additional information on wp-downloader source repo, visit source repo
- Install, Configure & Run for First Time
- Run (If saved pm2 config)
- Run (If didn't save pm2 config)
- Stop & Restart
Tip
For begginers: In Termux, in order to execute commands, you need to slide the command bar in bottom (with buttons including ESC
, HOME
, END
, PGUP
, CTRL
, ALT
), to right, so you can get a TextInput. You'll type the command and press Enter
. So the command is displayed (not yet executed) in Termux CLI. And to execute you have to press Enter
button again.
[WARNING] When running commands in Termux terminal, you should NOT click on Termux terminal, it'll pause the process, and if you paused process, you need to resume it by pressing
Enter
key.
Tip
Use Copy
button in the right end of the bash code block to avoid errors caused by typos.
-
First of all, we need to install Termux, Teminal Emulator in Android. You can download it from FDroid, or from GitHub Releases, or just install from Play Store. It's just as a normal app and so you can install it.
-
Make sure you have active internet connection. Open Termux, just like a normal app, it'll ask for Notification Permissions, we reccomend you allow Notifications. And then it'll install
Boostrap Packages
. And will automatically done. -
After
Boostrap Packages
are installed, in the CLI, execute following command. This command checks the package repositories for any updates to the Termux package lists.pkg update -y
Then wait...
-
After previous action completed, execute following command. This will upgrade already installed packages to the latest versions, which's recommended.
pkg upgrade -y
Note
If you're being asked for Yes/No
or etc in this terminal. Give y
, and press Enter.
-
We need to install
git
to cloneWP-Downloader
repo. So execute following comand to installgit
pkg install -y git
-
We need to have
NodeJS
installed to runWP-Downloader
. So execute the following command to install latestNodeJS
.pkg install -y nodejs
-
Now we need to clone
WP-Downloader
repository withgit
. To do that execute following command.git clone https://github.com/MaximilianGT500/wp-downloader.git
And wait till git clones the repo.
Warning
You must add .git
at the end of the repository URL to clone without loggin into GitHub
-
Further commands are to be performed to configure and run
WP-Downloader
, so we need to change directory to clonnedwp-downloader
folder. So execute the following command.cd wp-downloader
And now we are in
wp-downloader
directory -
WP-Downloader
use some third party dependancies, so we need to install them, so execute the following command. (We're executing this command insidewp-downloader
directory.npm install
-
Since we're in Android, it's beneficial to have
pm2
, so we can runwp-downloader
in background. So execute the following command to installpm2
. Note that we're installing pm2 globally with-g
.npm install pm2 -g
-
Now the final step to run WP-Downloader. We can run it with
pm2
. So execute the following command.pm2 start npm --name wpdl -- run start
And, this will deploy
WP-Downloader
to localhost. And the name forpm2
iswpdl
in this case.
Caution
Note that there is a space between --
and run
. So it's -- run
.
But it is --name
and is without spaces between --
and name
-
It's beneficial if it can restart the
WP-Downloader
app when Termux is restarted, or when System is restarted, by just executingpm2 start wpdl
. So let's save pm2 configuration so we can manage it more easily.pm2 save
Note
Saving PM2 config is not essential, but is reccomended. Becaus you can run the app again with a shorter command, and no need to change directories. For ease, just execute above command and save pm2 config too.
-
Now that WP-Downloader is succesfully deploted to localhost, we can access it via web browser. Go to following location, by entering it to addressbar of any Browser. Be sure to use addressbar, and without any other text in addressbar other than the location bellow.
The app is deployed to localhost and the port is
localhost:3000
3000
that's why we use this location. And, now you should see WP-Downloader app loaded in your Web Browser, in the address oflocalhost:3000
Tip
Here's a short demonstration how to install, configure and run for first time
20241112_205641.mp4
If you have installed and configured WP-Downloader
as guided above, but the app is not running in localhost
you need to start it with pm2 in Termux. In this section, we assume that you have saved pm2 config with THIS STEP. Or if you've saved it, you need to follow THIS SECTION
-
Open Termux, just like a normal app
-
Because you've saved pm2 config, you don't need to change dir. What we have to do is just run the app. So execute the following command. (We DON"T NEED TO BE INSIDE
wp-downloader
directory)pm2 start wpdl
This shorter command get the saved config and run it.
-
Now that WP-Downloader is succesfully deploted to localhost again, we can access it via web browser. Go to following location, by entering it to addressbar of any Browser. Be sure to use addressbar, and without any other text in addressbar other than the location bellow.
localhost:3000
The app is deployed to localhost and the port is
3000
that's why we use this location. And, now you should see WP-Downloader app loaded in your Web Browser, in the address oflocalhost:3000
If you have installed and configured WP-Downloader
as guided above, but the app is not running in localhost
you need to start it with pm2 in Termux. In this section, we assume that you've not saved pm2 config with THIS STEP. Or if you've saved it, you need to follow THIS SECTION
-
Open Termux, just like a normal app
-
We need to change directory to where we clonned. The directory name was
wp-downloader
. So execute the following command to change directory.cd wp-downloader
-
As we've configured ealier, what we have to do is just run the app. So execute the following command. (We ARE INSIDE
wp-downloader
directory)pm2 start npm --name wpdl -- run start
-
Now that WP-Downloader is succesfully deploted to localhost again, we can access it via web browser. Go to following location, by entering it to addressbar of any Browser. Be sure to use addressbar, and without any other text in addressbar other than the location bellow.
localhost:3000
The app is deployed to localhost and the port is
3000
that's why we use this location. And, now you should see WP-Downloader app loaded in your Web Browser, in the address oflocalhost:3000
-
You may want to stop WP-Downloader, [You can start again with just a singal command (guided above)]. In that case you can execute the following command.
Note that we don't want to change the directory to restart or stop an app.pm2 stop wpdl
Note that
wpdl
is the same app name that we used when running it. Note that we can use any name for it but have to use the same one. And there should not be spaces in name. If you must, you can add name in double quotations (ex:pm2 stop "wpdl server"
for the name of "wpdl server"). For ease of use, just use the predefined valuewpdl
. You don't need to change anything. And the service will be stopped. -
In any case, if you want to restart the WP-Downloader, you can execute the following command.
Note that we don't want to change the directory to restart or stop an app.pm2 restart wpdl
Note that
wpdl
is the same app name that we used when running it. Note that we can use any name for it but have to use the same one. And there should not be spaces in name. If you must, you can add name in double quotations (ex:pm2 stop "wpdl server"
for the name of "wpdl server"). For ease of use, just use the predefined valuewpdl
. You don't need to change anything. And it'll restart the app.