mac 安装mamp_如何使用MAMP在Mac上本地安装WordPress

mac 安装mamp

Do you want to install WordPress locally on Mac? Installing WordPress on your computer allows you to try out WordPress before you start a blog. In this article, we will show you how to install WordPress locally on Mac using MAMP.

您要在Mac上本地安装WordPress吗? 在计算机上安装WordPress后,您可以在开始博客之前尝试WordPress。 在本文中,我们将向您展示如何使用MAMP在Mac上本地安装WordPress。

Installing WordPress locally on Mac using MAMP

Tip: Not using Mac? We also have a tutorial on how to install WordPress locally on Windows.

提示:不使用Mac? 我们还提供了有关如何在Windows上本地安装WordPress的教程。

如何在Mac上安装MAMP (How to Install MAMP on Mac)

The first thing you need to do is visit the MAMP website and download MAMP. Once the download is finished, you will need to open the downloaded file and drag the image file inside it to your Applications folder. Next, simply follow the on-screen instructions.

您需要做的第一件事是访问MAMP网站并下载MAMP。 下载完成后,您将需要打开下载的文件并将其中的图像文件拖到“应用程序”文件夹中。 接下来,只需按照屏幕上的说明进行操作。

Mamp Installer

After the installation, you can go ahead and launch MAMP from the Applications » MAMP on your computer.

安装后,您可以继续并从计算机上的“ 应用程序”»“ MAMP”启动MAMP。

Note: MAMP also installs MAMP Pro (paid version), so remember to click on the right one.

注意: MAMP还安装了MAMP Pro(付费版),因此请记住单击右侧的。

Before you get started, we recommend configuring a few settings to make your MAMP experience better. You can do this by launching the Preferences menu and then switch to the ports tab.

在开始之前,我们建议配置一些设置以使您的MAMP体验更好。 您可以通过启动“首选项”菜单,然后切换到“端口”选项卡来执行此操作。

Change Apache ports

Enter port 80 for Apache and then click on the OK button.

输入Apache的端口80,然后单击“确定”按钮。

Setting Apache to use port 80 will allow you to access your local websites from http://localhost instead of http://localhost:8888. However this also means that each time you start MAMP servers, you will have to provide the admin password of your computer.

将Apache设置为使用端口80,将允许您从http:// localhost而不是http:// localhost:8888访问本地网站。 但是,这也意味着每次启动MAMP服务器时,都必须提供计算机的管理员密码。

The next step is to set the document root folder. This will be the folder where you will create and store your websites. By default, MAMP uses /Applications/MAMP/htdocs/ folder, but you can change that to a more accessible location.

下一步是设置文档根文件夹。 这将是您用来创建和存储网站的文件夹。 默认情况下,MAMP使用/ Applications / MAMP / htdocs /文件夹,但是您可以将其更改为更易于访问的位置。

In the preferences dialog box, click on Web Server tab and then select the folder where you want to store your websites. Ideally, you should store each of your website in a new folder inside the Documents folder.

在首选项对话框中,单击“ Web服务器”选项卡,然后选择要用于存储网站的文件夹。 理想情况下,您应该将每个网站存储在Documents文件夹内的新文件夹中。

Select document root folder

You can name this folder anything you want. For example, htdocs, mywebsites, wpdev, etc. For the sake of this article, we will call it allwebsites.

您可以根据需要为该文件夹命名。 例如,htdocs,mywebsites,wpdev等。为了本文的方便,我们将其称为allwebsites。

Click OK to save your changes.

单击确定保存更改。

在Mac上安装WordPress (Installing WordPress on Mac)

Now that you have set up MAMP, let’s go ahead and install WordPress on your Mac computer.

现在您已经设置了MAMP,让我们继续在Mac计算机上安装WordPress。

First you need to visit the WordPress.org website to download a copy of WordPress. After downloading the file, you need to unzip it.

首先,您需要访问WordPress.org网站以下载WordPress副本。 下载文件后,您需要将其解压缩。

Next, copy the wordpress folder inside and paste it into your MAMP document root folder. You can rename this folder to anything you want (example: mysite, wpbeginner, etc).

接下来,复制其中的wordpress文件夹并将其粘贴到MAMP文档的根文件夹中。 您可以将此文件夹重命名为所需的任何名称(例如:mysite,wpbeginner等)。

WordPress needs a database to store all website data, so you will need to create a database before we install WordPress. Don’t worry, it’s not as hard as it sounds.

WordPress需要一个数据库来存储所有网站数据,因此在安装WordPress之前,您需要创建一个数据库。 不用担心,它并不像听起来那样难。

Simply click on the Open Web Start Page button in MAMP application window. A new browser window will open where you need to click on Tools » phpMyAdmin from the top menu bar.

只需在MAMP应用程序窗口中单击“ 打开Web起始页”按钮。 一个新的浏览器窗口将打开,您需要在顶部菜单栏中单击工具»phpMyAdmin

Open phpMyAdmin in MAMP

phpMyAdmin is a web-based application used to manage MySQL databases. In phpMyAdmin, you need to click on Databases and then create a new database.

phpMyAdmin是用于管理MySQL数据库的基于Web的应用程序。 在phpMyAdmin中,您需要单击Databases,然后创建一个新数据库。

You can name this database anything you want, but please write it down because you’ll need the database name in the next step. For this tutorial, we will call it test_db.

您可以根据需要命名该数据库,但是请写下来,因为下一步需要该数据库名称。 在本教程中,我们将其称为test_db。

Create database to install WordPress

Now that you have created the database, it is time to install WordPress.

现在您已经创建了数据库,是时候安装WordPress了。

Go to http://localhost/mysite in a new browser tab. If you re-named the wordpress folder to something else, then use that name here.

在新的浏览器选项卡中转到http:// localhost / mysite。 如果您将wordpress文件夹重命名为其他名称,请在此处使用该名称。

You’ll now see the first step of WordPress installation wizard asking you to select a language.

现在,您将看到WordPress安装向导的第一步,要求您选择一种语言。

Select WordPress language

Select the language that you want to install WordPress and then click on the continue button.

选择您要安装WordPress的语言,然后单击继续按钮。

On the next screen, WordPress will tell you about the information you will need to complete the installation. Click on the ‘Let’s go’ button to move forward.

在下一个屏幕上,WordPress将告诉您有关完成安装所需的信息。 点击“放手”按钮前进。

Next, you will be asked to enter your WordPress database information. You already know the database name from the step earlier. For username and password, you need to use root. For the database host, you need to use localhost.

接下来,将要求您输入WordPress数据库信息。 您已经从前面的步骤中知道了数据库名称。 对于用户名和密码,您需要使用root 。 对于数据库主机,您需要使用localhost

Enter your database information

Once you are done, click on the submit button to continue.

完成后,单击提交按钮以继续。

WordPress will now connect to your database and create a configuration file for you. After this, it will show you a success message. Click on ‘Run the installation’ button to proceed.

WordPress现在将连接到您的数据库并为您创建一个配置文件。 此后,它将向您显示成功消息。 单击“运行安装”按钮继续。

On the next screen, WordPress will ask you to provide your website information, choose a username and password, and enter an email address. Go ahead and fill in the form and then click on Install WordPress button.

在下一个屏幕上,WordPress将要求您提供网站信息,选择用户名和密码,然后输入电子邮件地址。 继续并填写表格,然后单击“安装WordPress”按钮。

WordPress installation

WordPress will now run the installation, and you’ll see a success message once it’s done.

WordPress现在将运行安装,完成后您将看到成功消息。

Installation finished

You can now go ahead and login to the WordPress site installed locally on your Mac computer.

您现在可以继续并登录到Mac计算机上本地安装的WordPress网站。

WordPress dashboard
在Mac上本地尝试WordPress (Trying WordPress Locally on Mac)

The purpose of a local install is to help you test out WordPress or develop a website on your computer. Here are a few things you would want to try.

本地安装的目的是帮助您测试WordPress或在计算机上开发网站。 这是您想尝试的一些方法。

将本地WordPress安装移动到实时网站 (Moving Your Local WordPress Install to Live Website)

Once you have played with WordPress locally, you’ll want to move it to a live website. This is the only way others will be able to see your website.

在本地使用WordPress之后,您需要将其移至实时网站。 这是其他人能够看到您的网站的唯一方法。

To do that you’ll need a domain name and web hosting account. A domain name is your website’s address on the internet, and web hosting is where your website files are stored.

为此,您需要一个域名和虚拟主机帐户。 域名是您网站在Internet上的地址,而Web托管是网站文件的存储位置。

We recommend using Bluehost. They are one of the biggest hosting companies in the world and an officially recommended WordPress hosting partner.

我们建议使用Bluehost 。 他们是世界上最大的托管公司之一,也是官方推荐的WordPress托管合作伙伴。

Luckily, they are offering WPBeginner users discount on hosting and a free domain name. Basically, you can get started for $2.75 per month.

幸运的是,他们为WPBeginner用户提供托管折扣和免费域名。 基本上,您每月只需支付2.75美元即可开始使用。

→ Click Here to Claim This Exclusive Bluehost Offer ←

→单击此处要求此Bluehost独家优惠←

Once you have purchased hosting, see our article on how to make a website to install WordPress.

购买主机后,请参阅我们的文章, 了解如何制作一个网站来安装WordPress。

If you built a complete website already on your local host, then you can go ahead and follow our guide on how to move WordPress from local server to live site.

如果您已经在本地主机上建立了一个完整的网站,则可以继续按照我们的指南进行操作,以了解如何将WordPress从本地服务器移至实时站点

We hope this article helped you learn how to install WordPress locally on Mac using MAMP. You may also want to see types of websites you can create with WordPress.

我们希望本文能帮助您学习如何使用MAMP在Mac上本地安装WordPress。 您可能还想查看可以使用WordPress创建的网站类型

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-install-wordpress-locally-on-mac-using-mamp/

mac 安装mamp

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值