Category Archives: wordpress

wordpress

Como corrigir o Erro ao Estabelecer uma Conexão com o Banco de Dados no WordPress

Este erro é comum e você já deve ter visto pelo menos algumas vezes. Como iniciante no WordPress, este erro pode ser frustrante, especialmente se você teoricamente não fez nada para provocá-lo. Neste tutorial, vamos mostrar porque ele acontece e como corrigir o erro ao estabelecer uma conexão com o banco de dados no WordPress, apresentando várias soluções para as principais causas. As soluções propostas neste tutorial funcionaram para a maiorias dos usuários. Aprenda como resolver o problema de conexão com o banco de dados.

Nota: Como sempre, recomendamos que certifique-se de ter backup do seu banco de dados ao menos.

read more »

Code Snippets IIS wordpress

WordPress ISS Permalinks

Enabling Pretty Permalinks in WordPress

This walkthrough describes how to enable “Pretty Permalinks” for blog posts in the WordPress blog engine that is installed on IIS 7 and above. Typically, without URL rewriting functionality on a Web server, WordPress users must use “Almost Pretty” URLs, for example, http://contoso.com/index.php/yyyy/mm/dd/post-name/. By using the URL Rewrite module, you can use “Pretty Permalinks,” for example, http://example.com/year/month/day/post-name/, for WordPress blogs that are hosted on IIS.
Prerequisites

This walkthrough requires the following prerequisites:

IIS 7 or above with FastCGI and PHP installed. If you need to install PHP, follow the instructions in this article.
WordPress installed. If you need to install WordPress, follow the instructions in this article or use the instructions from the official WordPress site.
URL Rewrite installed.

Note that for the purposes of this walkthrough it is assumed that WordPress is installed in a Web site root directory. If WordPress is installed in a subdirectory, then the rewrite rules that are used in this walkthrough should be included in the Web.config file that is located within the same subdirectory where the WordPress files are.
Enabling Pretty Permalinks in WordPress

Use the following instructions to create pretty permalinks for your blog posts.

To enable pretty permalinks in Word Press:

Log on to WordPress with Administrator user rights.
In WordPress, click the Options tab.
On the Options page, click the Permalinks subtab.
This will take you to the page where you can customize how WordPress generates permalinks for blog posts.
On the Permalinks page, select Custom, specify below and enter “/%year%/%monthnum%/%day%/%postname%/” in the Custom structure text box.
Click Update Permalink Structure.

All the blog post links will have URLs that follow the format that you have specified, but if you click any one of those links the Web server will return a 404 – File Not Found error. This is because WordPress relies on a URL rewriting capability within the server to rewrite requests that have “pretty permalinks” to an Index.php file. In the next section, you will create a rule that will provide this capability.
Creating a Rewrite Rule

Open the Web.config file that is located in the same directory where the WordPress files are installed, and paste the following XML section into the system.webServer element:

<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>

This rule will try to match any requested URL. If the URL does not correspond to a file or a folder on the file system, it will rewrite the URL to the Index.php file. At that point, WordPress will determine which content to serve based on the REQUEST_URI server variable that contains the original URL before it was modified by this rule.
Testing the Rewrite Rule

After you save the rewrite rule to the Web.config file, open a Web browser and click any one of the permalinks in your WordPress blog. You should see the correct content returned by the Web server for each permalink.

Summary

In this walkthrough you learned how to use the URL Rewrite module to enable “pretty permalinks” in the WordPress blog engine. WordPress is just one example of the many popular PHP applications that can take advantage of the URL Rewrite module in IIS, a feature that enables user-friendly and search engine-friendly URLs.

 

 

By Ruslan Yakushev

http://www.iis.net/learn/extensions/url-rewrite-module/enabling-pretty-permalinks-in-wordpress

Tips & tricks wordpress

WordPress Pretty Permalinks on IIS 7.0

Just create a web.config  in wordpress root dir:


&lt;?xml version=&quot;1.0&quot;?&gt;

&lt;configuration&gt;

    &lt;system.webServer&gt;
        &lt;rewrite&gt;
            &lt;rules&gt;
                &lt;rule name=&quot;Main Rule&quot; stopProcessing=&quot;true&quot;&gt;
                    &lt;match url=&quot;.*&quot; /&gt;
                    &lt;conditions logicalGrouping=&quot;MatchAll&quot;&gt;
                        &lt;add input=&quot;{REQUEST_FILENAME}&quot; matchType=&quot;IsFile&quot; negate=&quot;true&quot; /&gt;
                        &lt;add input=&quot;{REQUEST_FILENAME}&quot; matchType=&quot;IsDirectory&quot; negate=&quot;true&quot; /&gt;
                    &lt;/conditions&gt;
                    &lt;action type=&quot;Rewrite&quot; url=&quot;index.php&quot; /&gt;
                &lt;/rule&gt;
            &lt;/rules&gt;
        &lt;/rewrite&gt;
     &lt;/system.webServer&gt;
&lt;/configuration&gt;

Read more:

WordPress Pretty Permalinks on IIS 7.0


http://codex.wordpress.org/Using_Permalinks

Code Snippets wordpress

Enabling Pretty Permalinks in WordPress

This walkthrough describes how to enable “Pretty Permalinks” for blog posts in the WordPress blog engine that is installed on IIS 7 and above. Typically, without URL rewriting functionality on a Web server, WordPress users must use “Almost Pretty” URLs, for example, http://contoso.com/index.php/yyyy/mm/dd/post-name/. By using the URL Rewrite module, you can use “Pretty Permalinks,” for example, http://example.com/year/month/day/post-name/, for WordPress blogs that are hosted on IIS.
Prerequisites

This walkthrough requires the following prerequisites:

IIS 7 or above with FastCGI and PHP installed. If you need to install PHP, follow the instructions in this article.
WordPress installed. If you need to install WordPress, follow the instructions in this article or use the instructions from the official WordPress site.
URL Rewrite installed.

Note that for the purposes of this walkthrough it is assumed that WordPress is installed in a Web site root directory. If WordPress is installed in a subdirectory, then the rewrite rules that are used in this walkthrough should be included in the Web.config file that is located within the same subdirectory where the WordPress files are.

read more »

Plugins wordpress

wp-plugin: SyntaxHighlighter

SyntaxHighlighter is a fully functional self-contained code syntax highlighter developed in JavaScript.

To get an idea of what SyntaxHighlighter is capable of, have a look at the demo page.

Easily post syntax-highlighted code to your site without having to modify the code at all. As seen on WordPress.com.

 

http://alexgorbatchev.com/SyntaxHighlighter/