欧美一区二区三区,国内熟女精品熟女A片视频小说,日本av网,小鲜肉男男GAY做受XXX网站

wordpress 跨域,跨域最佳解決方案

老白2年前223瀏覽0評(píng)論

wordpress 跨域,跨域最佳解決方案?

使用過(guò)濾器全局處理,避免在每個(gè)類處理。

wordpress 跨域,跨域最佳解決方案

Wordpress不同分類不同頁(yè)面能使用不同主題么了?

1.如果你是想給分類加特色圖像,可以這么做:

在wordpress后臺(tái):插件->安裝插件菜單對(duì)應(yīng)頁(yè)面搜索"categorythumbnail"或"categorythumbnails"或"fpwcategorythumbnails",下載安裝啟用,在你當(dāng)前主題的分類頁(yè)面模板中以你使用的插件的方式(通常是短代碼或函數(shù))調(diào)用即可,調(diào)用前可以加一個(gè)判斷,判斷下有圖片沒(méi),有圖片了輸出html,沒(méi)有了,就不輸出即可。

2.如果你是想在特定頁(yè)面顯示特定分類下文章的特色圖片以集中顯示,可以這么做:使用featuredimagethumbnailgrid或者在主題中自定義。

祝愉快!

wordpress是個(gè)著名的開(kāi)源網(wǎng)站程序?

對(duì)于國(guó)外軟件我覺(jué)得如果個(gè)人小站長(zhǎng)可以放心使用,國(guó)外軟件哪怕收費(fèi)也是針對(duì)那些大企業(yè)收費(fèi),大企業(yè)更注重版權(quán)問(wèn)題,正如曾經(jīng)微軟吵得沸沸揚(yáng)揚(yáng)維護(hù)版權(quán)一樣,最終不了了之。

織夢(mèng)對(duì)于剛開(kāi)始搞網(wǎng)站的確實(shí)起到關(guān)鍵性作用,國(guó)內(nèi)這里面對(duì)版權(quán)問(wèn)題重視起來(lái),不僅僅織夢(mèng)維權(quán),還有微擎等等都在維權(quán),在開(kāi)源這條路上其實(shí)并不好走,有實(shí)力有能力開(kāi)源長(zhǎng)期維護(hù),沒(méi)實(shí)力的開(kāi)源都沒(méi)人要,最感激的還是論壇開(kāi)源鼻祖DZ,始終也沒(méi)說(shuō)對(duì)個(gè)人小站長(zhǎng)下手。

wordpress建站流程有哪些?

推薦看一下我以前的文章?

https://m.toutiaocdn.com/item/6638512303362802184/?iid=59974348945&app=news_article&timestamp=1550583172&group_id=6638512303362802184

wordpress怎樣搭建網(wǎng)站?

想要搭建個(gè)人網(wǎng)站,就需要有單獨(dú)的服務(wù)器,就在阿里云購(gòu)買了臺(tái)服務(wù)器,選擇系統(tǒng)為“Ubuntu 14.04.5 LTS”,并在阿里云買了個(gè)域名(域名是為了方便記憶,否則輸入ip地址訪問(wèn)網(wǎng)站很不方便),下面就使用Ubuntu系統(tǒng)搭建WordPress個(gè)人網(wǎng)站。

安裝WordPress運(yùn)行環(huán)境

1.安裝Mysql數(shù)據(jù)庫(kù)

apt update

apt upgrade

apt install mysql-server

查看mysql是否安裝成功:

root@iZ2zeeg42qkecbhciml4pcZ:~# mysql --version

mysql Ver 14.14 Distrib 5.5.62, for debian-linux-gnu (x86_64) using readline 6.3

2.安裝PHP

apt-get install software-properties-common

add-apt-repository ppa:ondrej/php

apt update

apt install php7.2

apt install libapache2-mod-php7.2

apt install php7.2-mysql

apt install php7.2-fpm

查看php是否安裝成功:

root@iZ2zeeg42qkecbhciml4pcZ:~# php -v

PHP 7.2.16-1+ubuntu14.04.1+deb.sury.org+1 (cli) (built: Mar 7 2019 20:42:24) ( NTS )

Copyright (c) 1997-2018 The PHP Group

Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

with Zend OPcache v7.2.16-1+ubuntu14.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

3.安裝Nginx

install nginx

查看Nginx是否安裝成功:

root@iZ2zeeg42qkecbhciml4pcZ:~# nginx -v

nginx version: nginx/1.4.6 (Ubuntu)

重啟Nginx后,在瀏覽器中輸入http://阿里云服務(wù)器外網(wǎng)IP地址/

service nginx stop

service nginx start

如果圖片顯示為下圖,說(shuō)明阿里云服務(wù)器自動(dòng)啟動(dòng)了apache2的服務(wù),apache2和nginx都使用80端口,80端口沖突。

關(guān)閉apache2的服務(wù)

重啟php7.2-fpm服務(wù)和Nginx服務(wù):

在瀏覽器中輸入http://阿里云服務(wù)器外網(wǎng)IP地址/

安裝WordPress及其配置

1.Mysql創(chuàng)建數(shù)據(jù)庫(kù)和用戶:

root@iZ2zeeg42qkecbhciml4pcZ:~# mysql -u root -p

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 44

Server version: 5.5.62-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database 數(shù)據(jù)庫(kù)名稱 character set utf8 collate utf8_general_ci;

Query OK, 1 row affected (0.00 sec)

mysql> grant all on 數(shù)據(jù)庫(kù)名稱.* to '用戶名'@localhost identified by '用戶密碼';

Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;

Query OK, 0 rows affected (0.00 sec)

mysql> quit

Bye

root@iZ2zeeg42qkecbhciml4pcZ:~#

2.下載WordPress并安裝:

獲取WordPress軟件:點(diǎn)擊此處

將下載的wordpress-5.0.3-

zh_CN.tar.gz

上傳到云服務(wù)器上

安裝wordPress:

root@iZ2zeeg42qkecbhciml4pcZ:~# ls

wordpress-5.0.3-zh_CN.tar.gz

root@iZ2zeeg42qkecbhciml4pcZ:~# mv wordpress-5.0.3-zh_CN.tar.gz /var/www/

root@iZ2zeeg42qkecbhciml4pcZ:~# cd /var/www/

root@iZ2zeeg42qkecbhciml4pcZ:/var/www# ls

html wordpress-5.0.3-zh_CN.tar.gz

root@iZ2zeeg42qkecbhciml4pcZ:/var/www# tar -zxvf wordpress-5.0.3-zh_CN.tar.gz

......

root@iZ2zeeg42qkecbhciml4pcZ:/var/www# ls

html wordpress wordpress-5.0.3-zh_CN.tar.gz

root@iZ2zeeg42qkecbhciml4pcZ:/var/www# cd wordpress/

root@iZ2zeeg42qkecbhciml4pcZ:/var/www/wordpress# ls

index.php readme.html wp-admin wp-comments-post.php wp-content wp-includes wp-load.php wp-

mail.php

wp-signup.php xmlrpc.php

license.txt

wp-activate.php wp-blog-header.php wp-config-sample.php wp-cron.php wp-links-opml.php wp-login.php wp-settings.php wp-trackback.php

root@iZ2zeeg42qkecbhciml4pcZ:/var/www/wordpress# mv wp-config-sample.php wp-

config.php

使用vim命令編輯wp-config.php:

vim wp-config.php

修改文件中的數(shù)據(jù)庫(kù)配置信息,填寫(xiě)剛才創(chuàng)建的數(shù)據(jù)庫(kù)信息:

/** WordPress數(shù)據(jù)庫(kù)的名稱 */

define('DB_NAME', '數(shù)據(jù)庫(kù)名稱');

/** MySQL數(shù)據(jù)庫(kù)用戶名 */

define('DB_USER', '用戶名');

/** MySQL數(shù)據(jù)庫(kù)密碼 */

define('DB_PASSWORD', '數(shù)據(jù)庫(kù)密碼');

/**

* WordPress數(shù)據(jù)表前綴。

*

* 如果您有在同一數(shù)據(jù)庫(kù)內(nèi)安裝多個(gè)WordPress的需求,請(qǐng)為每個(gè)WordPress設(shè)置

* 不同的數(shù)據(jù)表前綴。前綴名只能為數(shù)字、字母加下劃線。

*/

$table_prefix = 'wp_';

在阿里云控制臺(tái)將域名解析到指定的服務(wù)器上:

控制臺(tái)->域名->解析->添加紀(jì)錄

配置服務(wù)安全組策略,將80(http)端口和443(https)端口開(kāi)放:

控制臺(tái)->云服務(wù)器ECS->網(wǎng)絡(luò)和安全->安全組->配置規(guī)則

配置80端口:

配置443端口:

配置后查看內(nèi)容:

編輯Nginx配置文件:/etc/nginx/sites-available/default

client_max_body_size 10m;

server {

listen 80;

listen [::]:80;

server_name localhost; #你的域名

root /var/www/wordpress;

index index.php index.html index.htm index.nginx-debian.html;

location / {

# First attempt to serve request as file, then

# as directory, then fall back to displaying a 404.

#try_files $uri $uri/ =404;

try_files $uri $uri/ /index.php?$args;

}

location ~ \.php$ {

# include fastcgi.conf;

include fastcgi_params;

fastcgi_buffer_size 128k;

fastcgi_buffers 32 32k;

#fastcgi_intercept_errors on;

# With php-fpm (or other unix sockets):

fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;

# With php-cgi (or other tcp sockets):

#fastcgi_pass 127.0.0.1:9000;

}

}

重啟Nginx后,在瀏覽器中輸入http://阿里云服務(wù)器外網(wǎng)IP地址/

service nginx stop

service nginx start

在瀏覽器中訪問(wèn)自己的域名,查看是否成功:

到此WordPress就安裝成功了,你可以自行配制您的網(wǎng)站信息。