wordpress修复插件_WordPress:尝试修复WordPress网站的用户体验

wordpress修复插件

First things first, I say this in many of my articles, but in this one you can take it as fact. I am not in any way an expert when it comes to WordPress. I am strictly a user. I don't know the programming languages involved, and although I could probably glean what is going on from the code, I have never done so.

首先,我在很多文章中都这么说,但是在这篇文章中,您可以将其视为事实。 在WordPress方面,我绝不是专家。 我严格来说是用户。 我不知道所涉及的编程语言,尽管我可能可以从代码中了解正在发生的事情,但我从未这样做过。

For many years I did work as a website developer. I did a lot of coding (pre-CSS) in HTML (that is kind of like saying you write programs in DOS -- it means next to nothing, except possibly that you have just dated yourself). Because of this I do have a little bit of a handle on how things work, but obviously not enough. I will admit up front that I did what I tell everyone I work with not to do, under any circumstances, change things directly in your production environment - but I will get back to that.

多年以来,我一直是网站开发人员。 我用HTML进行了很多编码(CSS之前的编码)(这有点像说您在DOS中编写程序-这意味着几乎什么都没有了,除了您可能自己已过时)。 因此,我确实对事物的工作方式有所了解,但显然还不够。 我会预先承认我已经做了我告诉我与之共事的人的事情,无论如何在任何情况下都不要在您的生产环境中直接进行更改-但我会回到正题。

For a couple of months my blog was down. I take complete responsibility. I was adding plugins, everything was working fine until I logged out and couldn't log back in. I think it had something to do with the functions.php file I edited (I never should have done that, but I am a great Monday morning quarterback ...). During a plugin install, it was suggested that I add a line to this file. Everything seemed to be working fine after the edits so I logged out (I have a feeling that I edited the wrong functions.php file, there are so many ...).

我的博客停了几个月。 我承担全部责任。 我正在添加插件 ,直到我注销并且无法重新登录 ,一切都工作正常。我认为这与我编辑的functions.php文件有关(我从不应该这样做,但是我今天是一个很棒的星期一早上四分卫...)。 在插件安装期间,建议我在此文件中添加一行。 编辑后一切似乎都工作正常,所以我注销了(我感觉我编辑了错误的functions.php文件,数量太多……)。

I am a computer analyst as my day job and specialize in computer security. I get the daily updates about security threats, so I can keep informed and keep my department up to date. One of these updates mentioned a security problem with the then current WordPress install and I figured I would keep my WP install up to date. When I tried to log in to update WordPress, I was unable to -- I received the two errors below. It seemed like everything was hosed. Although it turned out it was an easy fix, I didn't figure that out for almost 2 months.

我是计算机分析师,是我的日常工作,专门研究计算机安全 。 我会每天获取有关安全威胁的最新信息,因此我可以随时了解最新情况,并使我的部门保持最新状态。 其中一个更新提到了当前WordPress安装的安全问题,我认为我将使WP安装保持最新。 当我尝试登录以更新WordPress时,我无法-我收到以下两个错误。 似乎一切都在进行中。 尽管事实证明这是一个简单的解决方法,但我已经将近两个月才弄清楚。

wp-site-error.PNG
wp-site-php-error.jpg
FTP. It turned out that the hosting company had changed the FTP authentication method (that is how long it had been since I last used FTP to access the site). FTP连接。 原来,托管公司已更改了FTP身份验证方法(这是自我上次使用FTP访问该站点以来已花费的时间)。

Once I changed the way I tried to connect I was able to easily connect (using FileZilla). I looked at several configuration files. None of the ones I tried did any good. I tried deleting several of the newest plugin directories. Although this just generated more errors when I tried to log in, I think it also may have gotten rid of the main stumbling block to the log in process itself. Now I needed a WP expert to help me out, because I didn't know which configuration file to edit. I was toold to try the wp-config file and to change the Debug variable from false to true.

更改尝试连接的方式后,便可以轻松连接(使用FileZilla)。 我看了几个配置文件。 我尝试过的那些都没有任何好处。 我尝试删除几个最新的插件目录。 尽管这在我尝试登录时只是产生了更多错误 ,但 。 现在,我需要一位WP专家来帮助我,因为我不知道要编辑哪个配置文件。 我被告知尝试使用wp-config文件并将Debug变量从false更改为true。

I downloaded the file and then edited it and replaced it. This worked. I was able to get into my site (probably due to the deletion of the plugin directory that was causing the problem to begin with). When I logged in, there were a slew of errors, there were also a bunch of updates. I sent the errors to my son, the WP expert referenced above.

我下载了文件,然后对其进行了编辑和替换。 这工作了。 我能够进入我的网站(可能是由于删除了导致问题开始的插件目录)。 当我登录时,出现了很多错误,也有很多更新。 我将错误发送给我的儿子,即上面提到的WP专家。

Errors received:

收到错误:

Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /home1/chronoto/public_html/tom/wp-includes/functions.php on line 3508

Notice: Undefined index: pluginVer in /home1/chronoto/public_html/tom/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php on line 68

Notice: Undefined index: marginHeader in /home1/chronoto/public_html/tom/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php on line 600

Notice: Undefined index: marginTop in /home1/chronoto/public_html/tom/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php on line 602

Notice: Undefined index: marginLeft in /home1/chronoto/public_html/tom/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php on line 604

Notice: Undefined index: marginRight in /home1/chronoto/public_html/tom/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php on line 606

Notice: Undefined index: marginFooter in /home1/chronoto/public_html/tom/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php on line 608

Notice: Undefined index: footerMinHeight in /home1/chronoto/public_html/tom/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php on line 610

Notice: Undefined index: footerWidth in /home1/chronoto/public_html/tom/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php on line 612

Notice: Undefined index: footerX in /home1/chronoto/public_html/tom/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php on line 614

Notice: Undefined index: footerY in /home1/chronoto/public_html/tom/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php on line 616

Notice: Undefined index: footerFill in /home1/chronoto/public_html/tom/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php on line 618

Notice: Undefined index: footerPad in /home1/chronoto/public_html/tom/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php on line 620

Notice: Undefined index: pageSize in /home1/chronoto/public_html/tom/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php on line 622

Notice: Undefined index: unitMeasure in /home1/chronoto/public_html/tom/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php on line 624

Notice: Undefined index: orientation in /home1/chronoto/public_html/tom/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php on line 626

Notice: Undefined index: liSymbolType in /home1/chronoto/public_html/tom/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php on line 628

Notice: Undefined index: liSymbolWidth in /home1/chronoto/public_html/tom/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php on line 630

Notice: Undefined index: liSymbolHeight in /home1/chronoto/public_html/tom/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php on line 632

Notice: Undefined index: pluginVer in /home1/chronoto/public_html/tom/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php on line 634

I first updated everything. After WordPress and all the plugins were updated, almost all the errors were gone. I continued receiving errors from the PDF plugin until I changed the Debug variable in the WP-config file back to false.

我首先更新了所有内容。 WordPress和所有插件更新后,几乎所有错误都消失了。 我继续收到来自PDF插件的错误,直到将WP-config文件中的Debug变量更改回false。

ioncube.jpg

What is the take away?

什么是外卖?

  1. First, don't haphazardly edit php files (especially if you are like me and don't understand much about PHP)
    1. I will be very careful next time I try this (which I hope will be never)

    首先,不要随意编辑php文件(尤其是如果您像我一样并且对PHP不太了解的话)
    1. 下次尝试时,我会非常小心(希望永远不会)
  2. Second, Backup, Backup, Backup ...
    1. I used to use the free UpdraftPlus plugin to backup to my dropbox
    2. I have been looking around for a more comprehensive backup tool.  One WP expert suggested Backup Buddy (paid) and said about it, "the best backup tool IMO."  I looked at the following:
      1. Backup buddy - paid, but highly recommended
      2. ManageWP - trialware - Good if you manage more tha a couple of WP sites
        1. Beware this plugin leaves a backup directory when it is uninstalled
      3. Duplicator - WP plugin, so free
      4. WP BackitUp - WP plugin, so free
        1. Beware this plugin leaves a backup directory when it is uninstalled
    3. backups are good, in the extreme, but remember that a backup is useless if you are unable to restore using it.
    4. so far as I can tell, the backups generated by the UpdraftPlus plugin do NOT create a clone of the site

    二,备份,备份,备份...
    1. 我曾经使用免费的UpdraftPlus插件备份到我的保管箱
    2. 我一直在寻找更全面的备份工具。 一位WP专家建议使用Backup Buddy(付费),并称其为“最佳备份工具IMO”。 我看了以下内容:
      1. 备用伙伴 -已付费,但强烈建议
      2. ManageWP-试用软件-如果您管理多个WP网站,则很好
        1. 当心此插件在卸载时会离开备份目录
      3. Duplicator -WP插件,非常免费
      4. WP BackitUp -WP插件,非常免费
        1. 当心此插件在卸载时会离开备份目录
    3. 在极端情况下,备份是好的,但是请记住,如果无法使用备份进行备份,则备份是无用的。
    4. 据我所知,UpdraftPlus插件生成的备份不会创建该站点的克隆
  3. Third, use the wp_config debug variable - it can be a real time saver, but don't forget to change it back to false or your error.log file will grow exponentially if there are any errors in your plugins (many will throw some errors).

    第三,使用wp_config调试变量-它可以是实时保存程序,但不要忘记将其更改回false或error.log如果插件中有任何错误,日志文件将成倍增长(很多都会抛出一些错误)。
  4. If you have difficulty, address it immediately (don't wait like I did)

    如果您有困难,请立即解决(不要像我一样等待)
  5. Problems with WordPress may often be solved with updates to the core or plugins

    WordPress问题通常可以通过更新核心或插件来解决
  6. Use as few plugins as possible
    1. Because there is less chance of hosing your site from bad code
    2. the more plugins you use the slower your site will be

    使用尽可能少的插件
    1. 因为将您的网站从错误代码中删除的机会较少
    2. 您使用的插件越多,您的网站就会越慢
  7. Get rid of old themes you are no longer using, or have never used
    1. Themes take up more room than you think, so deleting old ones will give you more space to play with
    2. the older the theme, the more likely it will have problems with newer versions of WordPress.

    摆脱不再使用或从未使用过的旧主题
    1. 主题占用的空间超出了您的想象,因此删除旧主题将为您提供更多的播放空间
    2. 主题越旧,较新版本的WordPress就越有可能出现问题。
  8. Use a staging site for changes - I will  explain this one further

    使用暂存站点进行更改-我将进一步解释这一点

On Backups (point #2 above)

备份时 (以上第2点)

I have tried several backup options and can say, withouta doubt, that Backup Buddy was the easiest and most comprehensive tool.

我尝试了几种备份选项,毫无疑问,备份伙伴是最简单,最全面的工具。

  1. I downloaded the zip plugin from their homepage

    我从他们的主页下载了zip插件
  2. In my WordPress site, I went to add new plugin and clicked the upload button

    在我的WordPress网站中,我去添加了新插件,然后单击了“上传”按钮
  3. pointed the dialog to the zip file

    将对话框指向zip文件
  4. the plugin was installed and I activated it

    插件已安装,我激活了它
  5. I linked my dropbox

    我连结了我的保管箱
  6. I asked it to make a backup and download it to my dropbox (note that in this case, size does matter. The first time I ran this backup it stalled when it reached a whopping 7.15gb. It turned out that several other backup plugins had left a lot of garbage in several different directories, specifically UpdraftPlus and ManageWP. By deleting these extra backup zip files I regained over 6gb worth of space.  The last backup I made of my entire site was just over 500mb.)

    我要求它进行备份并将其下载到我的保管箱中(请注意,在这种情况下,大小确实很重要。我第一次运行该备份时,它达到了惊人的7.15gb时就停了下来。事实证明,其他几个备份插件也有在几个不同的目录中留下了很多垃圾,特别是UpdraftPlus和ManageWP。通过删除这些额外的备份zip文件,我重新获得了超过6GB的空间。我对整个站点所做的最后一次备份刚刚超过500mb。)
  7. to clone or move your site, simply download the importbuddy script and the backup zip file you just created to where you are going to install the site (http://yoursite.com/)

    要克隆或移动您的网站,只需将刚刚创建的importbuddy脚本和备份zip文件下载到要安装该网站的位置( http://yoursite.com/
  8. Run the installbuddy.php script (http://yoursite.com/installbuddy.php) BEFORE installing WordPress, and you are done.

    http://yoursite.com/installbuddy.php ),然后完成。

What is a staging site, how do I set it up, and how do I use it?

什么是登台站点,如何设置它,以及如何使用它?

These are questions that would be better addressed by a WordPress pro/expert. The answers also comprise a whole other article. I will try to summarize here. First, I should make it clear that if I had been doing this to begin with, I wouldn't have had this problem, because I would have discovered the problem locally before publishing it to my production site. As a computer analyst, specializing in security, I continually am reminding people to backup their computers and devices. I also always recommend that people NEVER make initial changes on a computer they are using for work -- their "production" machine -- but rather to make any changes in a test environment, preferably in a virtual machine. In this way if there is a problem one only needs to delete the VM file and/or go back to the last save in order to recover from what could have been a disaster. I used to do this with websites I was developing as well, but somehow got away from that. Before my institution started requiring us to use Ektron 400 CMS, I used Dreamweaver, which would keep a copy of the site locally and sync to the remote server. This was an extremely easy way to develop websites without the danger of putting in code that didn't work and could take down the whole site.

这些问题可以由WordPress专业人士/专家更好地解决。 答案还包括其他整篇文章。 我将在这里尝试进行总结。 首先,我应该明确指出,如果我从一开始就这样做,就不会有这个问题,因为在将其发布到生产站点之前,我会在本地发现该问题。 作为专注于安全性的计算机分析师,我一直在提醒人们备份他们的计算机和设备。 我还始终建议人们切勿在工作中使用的计算机(即“生产”计算机)上进行初始更改,而应在测试环境(最好是虚拟机)中进行任何更改。 这样,如果出现问题,只需删除VM文件和/或返回上一次保存,即可从灾难中恢复。 我以前也使用自己开发的网站来做到这一点,但是以某种方式摆脱了这种情况。 在我的机构开始要求我们使用Ektron 400 CMS之前,我使用过Dreamweaver,它将在本地保留该站点的副本并同步到远程服务器。 这是开发网站的一种非常简单的方法,而没有放置无法正常工作并可能导致整个网站瘫痪的代码的危险。

So how do you do that for a WordPress site?  The short answer is, that depends (sorry). What does it depend on, you might ask. Several things, but the most important is what is running in the backend. Are you going to run Dreamweaver, or something else? What local server is running and what protocol are you going to use? We'll take this one step at a time (just remember, you need to measure the time this takes to setup against the time you will save if your site goes down, not to mention the peace of mind you will gain).

那么您如何为WordPress网站做到这一点? 简短的答案是,这取决于(抱歉)。 您可能会问,这取决于什么。 有几件事,但最重要的是后端中正在运行的东西。 您要运行Dreamweaver还是其他? 什么本地服务器正在运行,您将使用什么协议? 我们将一次迈出这一步(请记住,您需要将设置该站点所花费的时间与您在网站出现故障时节省的时间进行比较,更不用说您会省心了)。

I decided to test this out myself to see what it was like to setup a local WordPress instance. I wanted to be able to edit the local site using Dreamweaver, mostly because that is what I have always used to create and edit websites. After only a little searching, I found this video on setting up a local instance of WordPress with Dreamweaver. It turns out that DW will not properly display PHP code (at least my older version -- CS3). So you should take that into account when trying this out. There are several steps to the install, all of which are covered in the video referenced above. To summarize, they are:

我决定自己进行测试,以了解设置本地WordPress实例的感觉。 我希望能够使用Dreamweaver编辑本地站点,主要是因为这就是我一直用于创建和编辑网站的方法。 稍作搜索后,我发现此视频介绍了如何使用Dreamweaver设置WordPress的本地实例。 事实证明DW无法正确显示PHP代码(至少是我的旧版本-CS3)。 因此,尝试此操作时应考虑到这一点。 安装过程分几个步骤,上面的视频介绍了所有步骤。 总而言之,它们是:

  1. Download and install WordPress

    下载并安装WordPress
  2. Download and install a server, such as MAMP, WAMP or XAMPP (the last seems to me to be the hardest to setup, but that is my personal opinion)

    下载并安装服务器,例如MAMP,WAMP或XAMPP(在我看来,最后一个设置最难,但这是我个人的看法)
  3. Configure your WordPress installation with your server install

    使用服务器安装配置WordPress安装
  4. Export your WP file(s) from your online account to a local file

    将您的WP文件从您的在线帐户导出到本地文件
  5. Import the local WordPress file(s) you just downloaded

    导入刚刚下载的本地WordPress文件
this thread. Also note that 此主题中 。 还要注意, this post seems pretty comprehensive (using MAMP to create a local duplicate of your site). I used some of his steps, and they worked well. I think though that I may have mixed too many different approaches in my attempt to get an exact look alike site on my local machine. 这篇文章看起来很全面(使用MAMP创建您网站的本地副本)。 我使用了他的一些步骤,并且效果很好。 我想尽管我可能混合了太多不同的方法来尝试在本地计算机上获得完全相同的外观。

I did get it to work pretty well using MAMP and BackupBuddy. Here is a silent video of the steps I took during installation and restore. The only hard part (the rest is easy) is setting up the local database on your computer. I ended up using phpmyadmin in MAMP for that and it was fairly straight forward.

我确实使用MAMP和BackupBuddy使其运行良好。 这是我在安装和还原期间采取的步骤的无声视频 。 唯一困难的部分(其余部分很简单)是在计算机上设置本地数据库。 我最终在MAMP中使用了phpmyadmin,这很简单。

This homepage for MAMP comes up when you have correctly installed it.

正确安装后,将显示此MAMP主页。

homepage.PNG

This phpMyAdmin age is brought up from the tools -> phpMyAdmin menu item

这个phpMyAdmin时代来自工具-> phpMyAdmin菜单项

phpmyadmin.PNG

See the discussion above regarding Backup Buddy for more information about creating a local site. I found that solution the easiest.

有关创建本地站点的更多信息,请参见上面有关“备份伙伴”的讨论。 我发现该解决方案最简单。

For further information check out this question on DW and WordPress (the answer is partially -- don't use DW). It eventually came down to, since my version of DW didn't or couldn't display PHP properly, I am looking at other options. You can also check out this question (note the answer). You can access Expert Exchange's list of WordPress video microtutorials here.

有关更多信息,请在DW和WordPress上查看此问题 (答案部分是-不要使用DW)。 最终归结为,由于我的DW版本无法或无法正确显示PHP,因此我正在寻找其他选项。 您也可以查看此问题 (记下答案)。 您可以在此处访问Expert Exchange的WordPress视频微型教程列表。

相关外部文章 (Related outside articles)

翻译自: https://www.experts-exchange.com/articles/18553/WordPress-A-user's-experience-trying-to-fix-a-WordPress-site.html

wordpress修复插件

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值