熱門文章

顯示具有 wordpress 標籤的文章。 顯示所有文章
顯示具有 wordpress 標籤的文章。 顯示所有文章

2017年6月4日 星期日

[WordPress]如果網站被駭怎麼?還有如何預防...

許多的站長都遇到過就是在打開自己正規的網站的時候,在點擊下一步後就會突然跳轉到一個非法網站上去,這就是所說的網站被掛上木馬了,這樣將會嚴重影響網站的運行。所以下面關於WordPress網站被掛木馬怎麼辦進行分析。
  當網站被掛上了木馬,首先就是要找到木馬的位置在哪,在對其進行清除。通常的木馬插件都是使用js代碼放置在前端的,來產生惡意的鏈接,通過惡意跳轉等其他的方式來劫持你的網站,通常這些代碼都是放置在前端的,也可以使用php代碼將js輸出到前端的位置。


  WordPress網站清除惡意代碼的幾種方式:

  1、到官網上下載最新版本的WordPress將原先的直接覆蓋
  在進行覆蓋式可以將wp-includes文件夾、wp-admin文件以及更目錄的文件都進行直接覆蓋掉。並且對數據庫在重新連接,這樣有助於數據不會被丟失,同時能夠消除掉帶有木馬的文件。若進行覆蓋之後還沒有清除掉木馬病毒,可以對插件進行逐一排查,找到其位置並進行徹底消除。

  2.手動查詢木馬
  使用ftp的工具對文件進行查看,能夠看到最新的修改日期,若近期自己沒有進行修改的話,哪些修改日期靠前的的文件就有最大的嫌疑被掛上了木馬,只要將該文件下載下來刪除木馬後,在進行上傳或者是到官網上重新下載並進行覆蓋文件就可以了。

  3.使用軟件查殺木馬
  一些進行木馬的查殺的軟件在許多的服務器以及虛擬主機商都是存在的,若本身不存在可以自己進行安裝這類的軟件,之後用其查殺木馬。

  如何降低網站被掛木馬的幾率:
  1、網站使用主題、插件都應該到官方發佈的網站上去下載,不要在一些不知來歷的網站上下載。
  2、實時關注官網的動態,及時更新主題、插件。確保你的主題及插件都是最新的版本。
  3、及時更新wordpress,使你的wordpress是最新的版本。
  4、定期進行網站資料和數據庫的備份,當出現問題就需要及時的恢復。
  5、不要將網上來歷不明的代碼粘貼到網站中來,尤其是對代碼不瞭解的站長們。
  6、實時關注自己的網站,當網站出現異常就要進行檢查。


  WordPress網站被掛木馬怎麼辦就介紹到這,希望對大家有所幫助。網絡安全是很重的,站長們一定有做夠的重視,自己的網站做好防禦準備,不讓黑客有可乘之機。



掃描網站是否安全: 線上掃描



https://sucuri.net/guides/how-to-clean-hacked-wordpress

https://www.elegantthemes.com/blog/tips-tricks/how-to-scan-your-wordpress-website-for-hidden-malware


http://www.hongkiat.com/blog/wordpress-plugins-detect-malicious-codes/


簡體
https://zhuanlan.zhihu.com/p/27131415

http://www.wordpress.la/trojan-virus-2760.html

2017年2月24日 星期五

修正avid theme 手機瀏覽時的slider大小

theme options -> custom CSS

@media only screen and (max-width: 640px) {
#sliders-container .fusion-slider-container,
#sliders-container .fusion-slider-container .tfs-slider,
#sliders-container .fusion-slider-container .tfs-slider .background {
    height: 250px !important;
}
}
}

調整高度為250px

2017年2月7日 星期二

aws ec2 如何透過ssh使用phpmyadmin

使用marketplace快速安裝wordpress後,我想要使用phpmyadmi來操作MySQL 卻發現

For security reasons, this URL is only accessible using localhost (127.0.0.1) as the hostname.

不能直接用瀏覽器,必須透過以下方法:




原文

For security reasons, these applications are accessible only when using 127.0.0.1 as the hostname. To access them from a remote system, you must create an SSH tunnel that routes requests to the Apache Web server from 127.0.0.1. This implies that you must have an SSH private key and be able to connect to your server over SSH in order to access these applications remotely.

Linux And Mac OS X

To access the application using your Web browser, create an SSH tunnel, as described below.
  • Make sure you can log in to the server using SSH. Refer to the FAQ for more information on this.
  • Open a new SSH session to the server using the command below:
     ssh -N -L 8888:127.0.0.1:80 -i KEYFILE bitnami@SERVER-IP
    
    Remember to replace KEYFILE in the previous commands with the path to your private key file, and SERVER-IPwith the IP address or hostname of your virtual machine. Note that if successful, this command will create an SSH tunnel but will not display any output on the server console.
While the tunnel is active, you should be able to access the phpMyAdmin console through the secure SSH tunnel you created, by browsing to http://127.0.0.1:8888/phpmyadmin.


盡量翻譯出來.....


因為安全因素,這程式僅能允許主機(指雲端server)本地連線。如需遠端存取(就是你在用的這台client),你必須經由SSH方式向主機的apache伺服器提出請求。這表示你必須有SSH私鑰才能透過SSH連到server進而使用該程式。

Linux and Mac

使用瀏覽器存取此程式前,你必須透過SSH方式,步驟如下:

  • 確定你能夠透過SSH登入server
  • 另開視窗,使用以下command:

 ssh -N -L 8888:127.0.0.1:80 -i KEYFILE bitnami@SERVER-IP
keyfile : 你的私鑰。可以直接拖曳檔案得到私鑰路徑避免打錯
bitnami@SERVER-IP :下圖紅框即是



輸入後終端機並不會有任何的反應,請直接到瀏覽器輸入 http://127.0.0.1:8888/phpmyadmin

完成!!

參考 參考2

2016年11月27日 星期日

[WordPress開發流程大公開!]本機開發再完整備份上線(Mac,Win)

WordPress是一個以PHP和MySQL為平台的自由開源的部落格軟體和內容管理系統content management system (CMS)。WordPress具有外掛模組架構和模板系統。Alexa排行前100萬的網站中有超過16.7%的網站使用WordPress。到了2011年8月,約22%的新網站採用了WordPress。WordPress是目前網際網路上最流行的部落格系統。
本地測試軟體:MAMP(意思是My Aoache MySQK PHP 的縮寫)



MAMP是一個整合工具讓你在幾秒之內安裝好伺服器環境,有免費版跟付費版。讓你不用碰到任何的程式碼、煩雜的設定即可以快速的建置網路伺服器環境,而且當你不需要時只要刪除MAMP資料夾不會影響電腦原本的設定 (i.e. MAMP does not modify any of the "normal" system).


使用步驟大致是

  1. 安裝MAMP
  2. 啟動MAMP
  3. 放置wordpress至根目錄
  4. 建立資料庫
  5. 設定wp-config
  6. 完成本機模式




安裝方法:基本上就是就是下一步下一步就完成了。如安裝過程有問題可以看看這裡


開啟: 大象圖示的MAMP 或MAMP(試用),不過以下為MAMP教學


MAMP架站整合軟體
雖然是英文版,但是操作簡單,現在先點左邊的齒輪(Preferences)
MAMP change ports
預設的Port為8888 & 8889,我們現在點擊最下面的"Set Web & MySQL to 80 & 3306"
將它改為80&3306,接著OK


MAMP start servers
接著我們點擊右邊的"Start Servers"啟動伺服器,啟動時圖示變為綠色
接著按中間的"Open WebStart page"
MAMP Welcome page


看到以上畫面代表成功一半了,接著點擊上排左邊數來第二個"My Website"將會開啟以下頁面

在這裡可以看到你的網站資料夾是在 /Applications/MAMP/htdocs 下面

這裡就是我們要放wordpress的地方了(網站根目錄)
MAMP 網站根目錄
上圖可以看到我已經放了一些wordpress在上面了
若您是直接解壓縮在這裡,你的wp 網址會是 http://localhost
像我這樣則是 http://localhost/wordpress


接著,我們回到MAMP 歡迎畫面點擊上方左邊數來第四個" Tool >phpMyAdmin " 來建立我們的資料庫
phpmyadmin 新增資料庫

此範例我建立了test 資料庫


我們已經上傳了wordpress並且建立好資料庫,現在就瀏覽器開啟Wordpress所在位置
(此範例我放在http://localhost/ww)

衝吧! 設定我們的資料庫
在MAMP 歡迎頁面(http://localhost/MAMP/?language=English)的MySQL部分我們可以找到資料庫使用者名稱密碼均為"root" ,資料庫位址 就不須更動,如下圖填寫即可。






順利的在本機安裝好wordpress ,方便測試修改。
下一步驟,就是要教大家怎麼備份整個wordpress 以及還原或者搬運到其他host

前兩天建立的網路商店範例 供您參考 http://fujifilm.lionfree.net

第二部分-複製到host
如果還沒有買空間的話可以試試,免費Lionfree中文host教學

SaveSave
SaveSave

2016年11月26日 星期六

[WP]攝影作品主題-免費提供給你使用


wordpress免費攝影主題 fullscreen theme

Fullscreen theme 

一看到首頁就可以感受得到,用滿版的作品集來呈現。每張圖片都可以連結到該文章裡,可以很迅速地看到該系列作品。很棒的設計,不需要過多的文字去敘述。
首頁的文章是選擇某一個分類來做呈現,會直接取該文章的特色圖片裁切。文章是一欄式的設計。

Fullscreen is a free one-column photography and multimedia WordPress theme that provides visual artists a unique way of presenting their latest work using a minimalist side-scrolling homepage. Related


此主題有提供demo檔案可以匯入,套用此主題必須去修改縮圖的大小為200x200,更多說明詳見網站


2016年11月15日 星期二

[WP]Free themes

https://themeisle.com/

ShopIsle
v2.2.0  View Changelog
DocumentationDownload
Amadeus
DocumentationDownload
Parallax One
v2.1.1  View Changelog
DocumentationDownload
Flat
v1.7.6  View Changelog
DocumentationDownload
Zerif Lite
v2.0.4  View Changelog
DocumentationDownload
Reviewzine
v1.0.1  View Changelog
DocumentationDownload
Rhea
v1.0.1  View Changelog
DocumentationDownload
Clarina
DocumentationDownload
Hestia
v1.0.6  View Changelog
DocumentationDownload
Azera Shop Luxury
v1.0.3  View Changelog
DocumentationDownload
Shop Isle Companion
v1.0.3  View Changelog
DocumentationDownload
TheMotion Lite
v1.1.7  View Changelog
DocumentationDownload
LawyeriaX Lite
v1.0.9  View Changelog
DocumentationDownload
Naturelle
DocumentationDownload
Zillah
v1.0.12  View Changelog
DocumentationDownload
Adblock Notify Lite
v2.0.9  View Changelog
DocumentationDownload
FEEDZY RSS Feeds
DocumentationDownload
Intergeo – Google Maps Plugin Lite
v1.1.6  View Changelog
DocumentationDownload
IsleMag
v1.0.15  View Changelog
DocumentationDownload
FlyMag
DocumentationDownload
Oblique
DocumentationDownload
Azera Shop
v1.0.18  View Changelog
DocumentationDownload
Llorix One Lite
v0.1.22  View Changelog
DocumentationDownload
ResponsiveBoat
v1.1.4  View Changelog
DocumentationDownload
ZBlackbeard
DocumentationDownload
Visualizer: Charts and Graphs Lite
v1.7.1  View Changelog
DocumentationDownload
Pirate Forms
v1.0.18  View Changelog
DocumentationDownload
WPPR – Related Reviews
v1.2.1  View Changelog
DocumentationDownload
Zifer Child
DocumentationDownload
Custom Login Customizer
v1.0.8  View Changelog
DocumentationDownload
RokoPhoto Lite
v1.1.4  View Changelog
DocumentationDownload
Denta Theme Lite
DocumentationDownload
Mooveit Lite
v1.0.8  View Changelog
DocumentationDownload
Medica Lite
v1.2.11  View Changelog
DocumentationDownload
BookRev Lite
v1.7.3  View Changelog
DocumentationDownload
WP Product Review Lite
v2.9.6  View Changelog
DocumentationDownload
Plumbelt Lite
v1.2.9  View Changelog
DocumentationDownload
Lawyeria Lite
v1.1.6  View Changelog
DocumentationDownload
CW Business lite
v1.3.7  View Changelog
DocumentationDownload
Constructzine Lite
v1.3.9  View Changelog
DocumentationDownload
Music Band Lite
DocumentationDownload
Foliogine Lite
v1.5.5  View Changelog
DocumentationDownload
Premium Code Lite
v1.1.3  View Changelog
DocumentationDownload
CWP Youit
v1.2.2  View Changelog
DocumentationDownload
Caresland Lite
v1.6.1  View Changelog
DocumentationDownload
Metro CreativeX
v1.3.8  View Changelog
DocumentationDownload
CW Magazine
v1.1.8  View Changelog
DocumentationDownload
CWP Robi
DocumentationDownload
VertiMagazine
v1.2.2  View Changelog
DocumentationDownload
MiniMag
v1.1.2  View Changelog
DocumentationDownload
CreativeMag
DocumentationDownload
MiniMagazine
v1.1.6  View Changelog
DocumentationDownload
MegaResponsive Lite
v1.1.5  View Changelog
DocumentationDownload