2014-09-25 105 views
0

我想下載WordPress的Ubuntu上,但我似乎得到這個消息,所有的時間:Ubuntu的WordPress安裝

[email protected]:~$ cd ~/wordpress 
[email protected]:~/wordpress$ cp wp-config-sample.php wp-config.php 
cp: cannot create regular file ‘wp-config.php’: Permission denied 

是不是因爲我沒有權限創建或編輯文件和文件夾?

回答

0

請試試這個。

給予許可,您的文件夾

sudo chmod -R 777 /opt/lampp/htdocs/your folder name 

OR

複製您的WP-CONFIG-sample.php文件重命名爲WP-config.php文件和

更改用戶名,數據庫名,密碼和主機。

這樣的:------

define('DB_NAME', 'wordpress'); 

/** MySQL database username */ 
define('DB_USER', 'root'); 

/** MySQL database password */ 
define('DB_PASSWORD', ''); 

/** MySQL hostname */ 
define('DB_HOST', 'localhost'); 
+0

'777'是自殺......我不知道誰upvoted這個。 – Shomz 2014-09-25 12:49:07

+0

這僅僅是爲了給他的文件夾permission.Give權限755的文件夾。 – 2014-09-25 13:04:24

+0

它是遞歸的,所以裏面的任何東西(包括WP安裝)都會得到777。 – Shomz 2014-09-25 13:08:05

-1

通過以下3只以下說明我得到了WordPress的安裝成功地在我的Ubuntu 14.04:

1.安裝XAMPP從https://www.apachefriends.org/download.html enter image description here

使用命令運行下載的文件=>

local_ubuntu $ sudo chmod 777 xampp-li nux-x64-7.0.13-1-installer.run

local_ubuntu $ ./xampp-linux-x64-7.0.13-1-installer.run

安裝程序會彈出然後再安裝。

2.然後同樣地從https://bitnami.com/stack/wordpress/installer

enter image description here

運行下載的WordPress下載WordPress的文件=>

local_ubuntu $ sudo的搭配chmod 777 bitnami - WordPress的-4.7.1-0-Linux的x64的-installer.run

local_ubuntu $ ./bitnami-wordpress-4.7.1-0-linux-x64-installer.run

安裝程序彈出,然後我安裝在/ opt/lamp/htdocs/WordPress。

3.a.)從XAMPP屏幕 - >啓動所有服務。

b。)轉到瀏覽器並在地址欄中輸入 - > localhost:8080/wordpress。

這一切都完成.....