This forum is no longer active. Please post your questions to our new community site
Editing PHP files in Ubuntu?
|
|
Hi there I was able to get as far as logging in to a VM remote console and getting a UNIX command prompt in BitNami that is running my WordPress stack. I am unable to properly use VIM to edit a file however. Is there an easier way to get to the proper folder and edit the wp-config.php file when I need to? There is no FTP running and no Graphical interface to make things easier. What would be the simplest way to text edit files in a VM/Unix environment? |
|
|
Hi, You can install in the machine other editors: emacs, vim, nano, etc. with “sudo apt-get install PACKAGE”. Also if you want to edit the wordpress files from Windows you can use the WinSCP tool. You only have to enable SSH in the virtual machine (disabled by default for security reasons). You can find more info in the “how to enable sshd” at http://bitnami.com/faq/virtual_machines Then you can see the file system from Windows using the WinSCP tool. I hope it helps. |
|
|
Thankyou I am sure it will help a lot. One other question I am hoping you can help with. I have edited the Site and URL settings in WordPress and saved a VM snapshop of the machine which has been a real help. It seems whenever I restart the Unix in VM I lose the Site and URL settings. I have to restore the snapshot to reconnect properly since I have configured my network to work with my dns name forwarded to a DDNS service. Thanks for your quick response to my editing issues. |
|
|
To follow up on installing a new editor… Reading package lists….Done Any reason why I cannot install any other editor? |
|
|
Regarding the WinSCP utility I managed to connect to my Ubuntu server from FileZilla but now cannot see the file properly formatted in Notepad when I try to edit a Linux file. |
|
|
Hi, It is necessary to update the repository before installing any package:
Then you can install any editor. You can also use Filezilla but you have to configure the SFTP access. You can use Wordpad on Windows to edit files or another editor, it should be compatible with linux. |
|
|
Thankyou again. That works. Do you have any thoughts on why my Site and URL changes are not sticking after a restart of Ubuntu? And one final question. I noticed that some directories require root authorization. |
|
|
Hi, Wordpress requires to set the public URL or IP address in the database. We will include a tool (/op/bitnami/updateip) to update the database automatically when the machine is restarted. If you have configured the URL you can remove this tool to not update the URL automatically. The wp-config.php file is in “/opt/bitnami/apps/wordpress/htdocs” folder. You can set the permissions to “bitnami:daemon” so you can edit from the bitnami account:
Cheers. |

