AWS 构建个人网站(2)

来源:互联网 发布:华为荣耀8数据 编辑:程序博客网 时间:2024/06/02 15:55

笔记:

How to remove ‘WordPress’ from your URL


      (cd /var/www/html)

  1. Install and create your WordPress Website in a directory namedwordpress on your Host.
  2. Go to http://example.com/wordpress/wp-admin/options-general.php(substitute example.com with your domain name.
  3. In the ‘WordPress address (URL):’ field change the address to the location of your main WordPress core files and in the ‘Site address (URL):’ field change the address to the root directory URL.Explains how to move WordPress from a subdirectory to the root directory
  4. Save your changes.
  5. Copy the index.php and .htaccess files from the WordPress directory into the root directory of your site (note you copy these files so you now have copies in the WordPress folder as well as in the root). You won’t have a .htaccess if you aren’t using WordPress permalinks so don’t worry if you don’t have a .htaccess file.
  6. Open your root directory’s index.php file in a text editor (Notepad++ is the best php editor out there and it’s free)
  7. Change the line:

    require('./wp-blog-header.php');

    to

    require('./wordpress/wp-blog-header.php');

  8. Login to your WordPress dashboard at http://example.com/wordpress/wp-admin/
  9. Update your Permalinks at http://example.com/wordpress/wp-admin/options-permalink.php
附加:

E37: No write since last change (add ! to override)

sudo chmod 600 ××× (只有所有者有读和写的权限)
sudo chmod 644 ××× (所有者有读和写的权限,组用户只有读的权限)
sudo chmod 700 ××× (只有所有者有读和写以及执行的权限)
sudo chmod 666 ××× (每个人都有读和写的权限)
sudo chmod 777 ××× (每个人都有读和写以及执行的权限)

0 0