Hello and kind regards from Switzerland.
First of all I am not a native speaker so please excuse any humble or strange expression. Thanks in advance!
I’m making my first steps in developing a WordPress theme with Blocs. Some time ago I started that by using MAMP on my Mac. In the meantime MAMP support has got somewhat “absent” rendering my first Blocs attempts at least “not working”. So I decided to set up my own server running on NGinx. The domain is working, up- and download via a regular SFTP client works like a charme. So no troubles on that side.
While setting up a new Blocs project I wanted to connect to my NGinx WordPress setup. Giving Blocs the login credentials results a successful connection to my own server locally and over the net but it drops me not into the directory where WordPress is installed but into the document root of my server. No matter what I am doing, the “www” directory seems to be at least unknown to Blocs.
I connected with the same “super user” credentials like I configured my FTP client.
Any idea?
Jens
Hi Jens,
Are you aware that WordPress is not really optimal for use with a NGINX server? WordPress heavily relies on the .htaccess file for functionality like url-rewriting, but .htacces files are not supported on NGINX-servers. That’s why most people use Apache as their server. However, with some tweaking to the NGINX-server you can run WordPress just fine. (giving you this as a small head’s up just in case you start running into unexplicable behaviour).
I think you might need to change the target directory to publish the WordPress-theme towards. The theme needs to be published in www/wp-content/themes.
However, since you indicate going into the document root, you’ll need to alter the target directory.
Are you able to connect to your server over SSH? If so, I would suggest the following:
- Log onto the server via SSH
- Navigate from the root directory to www/wp-content/themes using the CD command:
cd www/wp-content/themes
(this will only work if “www” is a direct subfolder of the directory root)
- Run the following command to get the full path:
pwd
This will output the absolute path (full path from the server root) of the themes folder. Copy-paste that path into Blocs. It could also be that Blocs only needs the part from the document-root.
I myself usually publish my theme-files locally and upload them via the backend, as I don’t want to break my site by perhaps publishing an erroneous version to my live site.
Oh and should you need some pointers on WordPress-specific config for NGINX, just reach out 
Hope this helps a bit.