2

I have a Wordpress website on one server. And on AWS (another server) I have block chain installed. Now I want to show the Block chain data (Smart Contarct Informationor Transactions) into my wordpress website. I know I can use web3js for the same. But do I need to install something on my wordpress server to run Web3js Commands?

Regards AKM

1 Answer 1

2

Basically, you just have to write the JS code to interact with Web3js. It can be server-side (Node.js), as well as client-side. Check out the web3 doc for configuration instructions and some basic usage examples.

If you just want to display some ordinary stuff from your blockchain, you may go client-side way and write a couple of lines to fetch information.

If you are looking for more complex things, you just have to develop a Node.js app (API) which will be the layer between your Blockchain and your WP website.

4
  • Thanks @someart for the details. Can't I use Web3JS directly with my Wordpress Pages?
    – Amit Modi
    Commented Sep 5, 2017 at 20:56
  • That depends on what you mean by WordPress pages. You just have to include that .js file with all code you need to your page (.html/.php). As far as I know, there is no obvious plugin for WP to interact with web3. So you have to write such functionality manually.
    – someart
    Commented Sep 5, 2017 at 21:06
  • Yes I do agree with your comments. So If I need to write web3js code into my .html or .php files of Worspress, in that case do I need to install web3JS on the server where wordpress is installed ?
    – Amit Modi
    Commented Sep 5, 2017 at 21:12
  • You will have to write your code in .js file which should be included to your .php/.html page. And web3 should be a part of .js file
    – someart
    Commented Sep 5, 2017 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.